无法连接到SMTP主机:smtp.gmail.com

时间:2013-03-13 12:41:00

标签: android

我是Android的新开发人员,在我的Android应用程序中处理smtp邮件服务。我在下面的链接中提供了参考资料

链接:http://mobiledevtuts.com/android/android-sdk-smtp-email-tutorial/ 链接:http://gafurbabu.wordpress.com/2012/01/08/sending-email-in-android-via-smtp-without-using-the-default-android-appbuiltin-email-application/

但是我得到了以下错误。我无法理解我做错了什么。有谁知道我的代码中发生了什么。

03-13 17:49:43.041: E/SendMail(30702): Could not connect to SMTP host: smtp.gmail.com, port: 465
03-13 17:49:43.041: E/SendMail(30702): javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
03-13 17:49:43.041: E/SendMail(30702):  javax.net.ssl.SSLException: Not trusted server certificate
03-13 17:49:43.041: E/SendMail(30702):  at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1391)
03-13 17:49:43.041: E/SendMail(30702):  at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)

提前致谢

0 个答案:

没有答案