Resource icon

插件 MailAPI邮件接口 1.0.1

版权类型
原创
API版本
1.0.8
版权链接
本帖
语言支持
简体中文
MailAPI
配置文件
smtp服务器:#邮件服务器,如qq邮箱smtp服务器填"smtp.qq.com"
端口:#邮件服务端口,如qq邮箱填"465"
邮箱地址:#开通smtp服务的邮箱,如qq邮箱填"[email protected]"
邮箱密码:#上面邮箱的smtp服务密码,qq邮箱->设置->账户,如下图

3361





new MailAPI();#使用配置文件
new MailAPI(String server, String port, String ssl, String mail, String password);#新指定服务器

sendTextOnlyMail(String sendTo,String title,String text);#发送纯文字邮件 sendTo:收件人地址;title:标题;text:内容

sendTextAndFileMail(String sendTo,String title,String text,String filePath)#发送文字与附件邮件 filePath文件路径


以上text均可使用HTML

verifyCode();#生成随机的6位字母与数字,可用作验证码

例:
new MailAPI().sendTextOnlyMail("[email protected]","验证码","<h1> 验证码 </h1>\n<p>绑定验证码</p>\n" + MailAPI.verifyCode());



by.殇丶歆​
Author
殇丶歆
价格
5金粒
Downloads
78
Views
2,082
First release
Last update

Ratings

4.75 star(s) 4 ratings

Share this resource

Latest updates

  1. 更新内容

    新增配置文件内容: SSL:#true 开启ssl;false 关闭ssl new MailAPI(String server, String port, String ssl...

Latest reviews

验证邮件存在乱码问题。
服务器系统:Ubuntu
很棒的作品,支持一下!
作者有插件群吗,下载显示网络错误下载不了
资瓷!
Back
Top Bottom