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 EmailConfigController

From Leeroopedia
Knowledge Sources
Domains Admin_API, Email_Configuration
Last Updated 2026-10-13 00:00 GMT

Overview

Concrete REST controller providing CRUD operations for SMTP email server configurations in the admin panel.

Description

The EmailConfigController exposes endpoints under `/sys/email/config` for paginated email config queries, adding new SMTP server configs, updating existing ones, and deleting email configs. Operations delegate to `IEmailService`.

Usage

Use this controller when building the admin email configuration management interface for managing SMTP servers used to send verification codes.

Code Reference

Source Location

Signature

@RestController
@RequestMapping("/sys/email/config")
public class EmailConfigController {

    @RequestMapping(value = "/queryPage", method = RequestMethod.POST)
    public B<Page<EmailConfigQueryRes>> queryPage(@Validated @RequestBody EmailConfigQueryReq req);

    @RequestMapping(value = "/add", method = RequestMethod.POST)
    public B<Void> add(@Validated @RequestBody EmailConfigAddReq req);

    @RequestMapping(value = "/update", method = RequestMethod.POST)
    public B<Void> update(@Validated @RequestBody EmailConfigUpdateReq req);

    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    public B<Void> delete(@Validated @RequestBody BaseDeleteEntity params);
}

Import

import com.intelligent.bot.api.sys.admin.EmailConfigController;

I/O Contract

Inputs

Name Type Required Description
req EmailConfigQueryReq Yes (query) Query and pagination params
req EmailConfigAddReq Yes (add) SMTP host, port, username, password
req EmailConfigUpdateReq Yes (update) Updated email config fields
params BaseDeleteEntity Yes (delete) IDs to delete

Outputs

Name Type Description
queryPage B<Page<EmailConfigQueryRes>> Paginated email config list
add/update/delete B<Void> Success confirmation

Usage Examples

Add Email Config

// POST /sys/email/config/add
{
    "host": "smtp.qq.com",
    "port": 465,
    "username": "sender@qq.com",
    "password": "smtp-password"
}

Related Pages

Page Connections

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