1

I am a new developer in android and working on smtp mail service in my Android app. I had follow below link for references

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

But I got the below errors. I can't understand where I did wrong. Is anyone know what happening in my code.

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)

Thanks in advance

Chirag
  • 56,621
  • 29
  • 151
  • 198
Gopal vaid
  • 376
  • 3
  • 7
  • Have you given Internet Permission in your AnroidManifest.xml ? – Raynold Mar 13 '13 at 12:43
  • Your problem is related to `SSLException: Not trusted server certificate`. You could follow the steps mentioned [here](http://stackoverflow.com/a/6378872/782094). – PCoder Mar 13 '13 at 12:55

0 Answers0