Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:A616567126 GPT WEB JAVA SendController

From Leeroopedia
Knowledge Sources
Domains Email, User_Registration
Last Updated 2026-10-13 00:00 GMT

Overview

Concrete REST controller for sending email verification codes during user registration, with duplicate email/phone checking and registration method validation.

Description

The SendController exposes a POST endpoint at `/send/email` that validates the system's registration method is set to email (method 2), checks that the email and mobile number are not already registered, and sends a verification code email via `SendMessageService`.

Usage

Import this controller when implementing the email registration flow to send verification codes to new users.

Code Reference

Source Location

Signature

@RestController
@RequestMapping("/send")
@Transactional(rollbackFor = E.class)
public class SendController {

    @RequestMapping(value = "/email", name = "发送邮件验证码")
    @AvoidRepeatRequest(msg = "请求频繁请稍后再试")
    public B<Void> sendMessage(@Validated @RequestBody SendEmailReq req);
}

Import

import com.intelligent.bot.api.sys.SendController;

I/O Contract

Inputs

Name Type Required Description
req.email String Yes Email address to send verification code
req.mobile String Yes Mobile number (for duplicate check)

Outputs

Name Type Description
returns B<Void> Success response or error message

Usage Examples

Send Verification Email

// POST /send/email
{
    "email": "user@example.com",
    "mobile": "13800138000"
}

// Response:
// { "status": 200, "message": "操作成功" }
// Error: { "status": 500, "message": "发送邮件功能已关闭" }
// Error: { "status": 500, "message": "邮箱或手机号已存在,请更换" }

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment