# mail-solon-plugin **Repository Path**: gitwcx/mail-solon-plugin ## Basic Information - **Project Name**: mail-solon-plugin - **Description**: 适配solon的邮件插件,基于jakarta.mail开发 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-28 - **Last Updated**: 2025-07-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mail-solon-plugin #### 介绍 solon邮件插件 #### pom配置 1. 在pom.xml文件配置仓库属性 ``` mail-solon-plugin https://gitee.com/gitwcx/mail-solon-plugin/raw/master/release/ ``` 2. 引入sdk依赖版本 ``` com.walter mail-solon-plugin ${last-version} ``` 3. 配置,在app.yml中添加以下配置 ```yml solon.mail: host: smtp.qq.com port: 465 username: username # 邮箱账号 password: password # 邮箱密码 ssl: true encoding: UTF-8 from: from ``` 4. 修改最新依赖版本,依赖版本可[点击](https://gitee.com/gitwcx/mail-solon-plugin/tree/master/release/com/walter/mail-solon-plugin)查看 ### 食用方法 ```java @Inject private MailService mailService; /** * 发送纯文本邮件 */ mailService.sendSimpleMail(mailParam); /** * 发送html邮件 */ mailService.sendHtmlMail(mailParam); /** * 发送带附件的邮件 */ mailService.sendAttachmentMail(mailParam); ``` - 具体可以参考[测试方法](https://gitee.com/gitwcx/mail-solon-plugin/blob/master/src/test/java/com/walter/mail/integration/MailServiceTest.java)