读书人

Aspirin: 不要指定任何smtp服务器用

发布时间: 2013-11-16 23:15:33 作者: rapoo

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

读书人网 >网络基础

热点推荐