开发者

What does props.put("mail.smtp.host", host) in JavaMail do?

Can anybody explain me what this line means in JavaMail API?

props.put("mail.smtp.host", host);

It i开发者_如何学Gos used to setup a mail server, but I don't understand it.


The String variable host contains the DNS name of a server that accepts connections on port 25 for SMTP. Adding this property to the props collection, which is in turn passed into Javamail, tells Javamail what host to send the mail to, initially.

You might also see something that helps in this answer.


This value helps Javamail to understand to which server it has to hit for DNS name. Its ususally through a port opened( default 25).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜