简体   繁体   English

从Java应用程序发送邮件而无需使用外部SMTP服务器

[英]Sending mail from a java app without using an external SMTP server

JavaMail requires that you specify an external SMTP server when sending mail. JavaMail要求您在发送邮件时指定一个外部SMTP服务器。 I want to have my java app send email directly without having to use an external SMTP server such as postfix or sendmail. 我想让我的Java应用程序直接发送电子邮件,而不必使用外部SMTP服务器(例如postfix或sendmail)。

Can anyone recommend a library which provides this kind of functionality? 谁能推荐提供这种功能的库? Ive done some googling and have come up with nothing. 我做了一些谷歌搜索,却一无所获。

It's not trivial to send mail yourself. 自己发送邮件并非易事。 To start with, you have to deal with DNS (MX records), queuing, connection management and maybe signing (DKIM). 首先,您必须处理DNS(MX记录),排队,连接管理以及可能的签名(DKIM)。 So you wouldn't find any light-weight library like JavaMail to do this. 因此,您不会找到像JavaMail这样的轻量级库来执行此操作。

Your best bet is JAMES, 你最好的选择是詹姆斯,

http://james.apache.org/ http://james.apache.org/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM