如何从Hotmail和雅虎发送电子邮件? [英] how to send email from hotmail and yahoo?
本文介绍了如何从Hotmail和雅虎发送电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从下面的回答没有8以下职位:
I am following answer no 8 from the following post:
<一个href="http://stackoverflow.com/questions/2020088/sending-email-in-android-using-javamail-api-without-using-the-default-android-app">SMTP样品code
这是工作的罚款gmail的。 但不工作的Hotmail和雅虎。 我定义以下SMTP服务器
it is working fine for the gmail. but not working for hotmail and yahoo. i define following smtp server
SMTP Server for hotmail:
smtp.live.com
SMTP Server for yahoo:
plus.smtp.mail.yahoo.com
如何为Hotmail和雅虎这code的工作?
how this code work for hotmail and yahoo?
推荐答案
阅读:
- Yahoo smtp settings and
- Hotmail smtp settings
请注意的端口号等细节
例如,Hotmail的
for example, hotmail
private String mailhost = "smtp.live.com";
和
props.put("mail.smtp.port", "587");
props.put("mail.smtp.socketFactory.port", "587"); // because of SSL
这篇关于如何从Hotmail和雅虎发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文