Aspirin: 不用指定任何smtp服务器,用JAVA发email

https://github.com/masukomi/aspirin 可以帮你发出email,  不用你显式指定一个smtp服务器。

API也非常简单。

看了一下它的源码,原来它的原理是: 当你指定收件人为xxx@yyy.com时,它会试着去DNS上找一下yyy.com对应的MX记录,作为临时的smtp server:   MX = a type of resource record in the Domain Name System that specifies a mail server responsible for accepting email messages on behalf of a recipient’s domain

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.