1

I followed this thread to connect to gmail to send email without user intervention:

Sending Email in Android using JavaMail API without using the default/built-in app

I got my jars from: http://code.google.com/p/javamail-android/downloads/list

I have checked my code over many times to insure compliance. I have checked my credentials over and over to insure they are correct. I keep getting the 'Could not connect to SMTP host: smtp.gmail.com, port: 465'

I am developing using Eclipse on Windows XP SP3. I am attempting to send from my Nexus One. Any ideas would be appreciated.

Community
  • 1
  • 1
Roy Hinkley
  • 10,111
  • 21
  • 80
  • 120

2 Answers2

2

Add this line in the manifest: uses-permission android:name="android.permission.INTERNET"

Roy Hinkley
  • 10,111
  • 21
  • 80
  • 120
0

Have you specified in your app that you're using an SSL connection?

drudge
  • 35,471
  • 7
  • 34
  • 45
  • Apparently not. I have reviewed all manifest permissions and do not see any specifically stating usage with SSL. If you would be so kind as to point me in the direction to do this I would be very grateful. :-) Thank you! – Roy Hinkley Oct 21 '10 at 13:15
  • I have zero experience with Android/Eclipse.. so I can't be of any help there. I just happened to recall that `smtp.gmail.com:465 = SSL` :) – drudge Oct 21 '10 at 17:44
  • props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); – M. Usman Khan Jul 20 '13 at 10:51