1 Star 0 Fork 2

周周/vertx-examples

forked from githubsync/vertx-examples 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
README.adoc 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
Thomas Segismont 提交于 2020-06-10 11:29 . Fixed mail examples

Vert.x Mail examples

Here you’ll find some examples how to use Vert.x mail-service to send mails to a SMTP server either from the local machine or via the event bus on another machine.

By default these example starts a "fake" mails server (just logging on the console):

LocalSmtpServer.start(2526);

If you want to use a different SMTP server, just remove this line and configure the options.

The examples use a few different configs

MailLocalhost

Just send a mail without authentication.

MailLogin

Send a mail to an external smtp server (e.g. googlemail, sendgrid, aol etc) requiring a login.

The login will currently use DIGEST-MD5, CRAM-MD5, PLAIN and LOGIN in order of preference. If the server announces AUTH but you don’t need it (e.g. if you are authenticated by a local ip address) turn login off with LoginOption.DISABLE. To specifically select an AUTH method or define the order of preference, you can do setAuthMethods("METHOD1 METHOD2").

MailHeaders

Send a mail with supplied headers (e.g. Received, Message-ID, Reply-To)

This example shows how you can send headers in a mail.

MailImages

This example shows how to send inlined images in mails.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhouzq2046/vertx-examples.git
git@gitee.com:zhouzq2046/vertx-examples.git
zhouzq2046
vertx-examples
vertx-examples
4.x

搜索帮助