Using Javamail for Android to send an email -


Here is the code I am using:

error is in GMail.sendMail where the line Attempts to transport Gmail with a valid username and password.

I can not find any way around this and it is weird because almost a month ago, this code worked perfectly

  04-23 21: 21: 41.526: I / System.out (27546): Delete: getProvider () Returns Jawks. similarity. Provider [TRANSPORT, SMTP, com.sun.mail.smtp.SMTP Transports, Sun Microsystems, Inc., 1.4.1] 04-23 21: 21: 41.526: I / System. Out (27546): Debug SMTP: Use is still correct, use true here 04 -223 21: 21: 41.526: I / System. Out (27546): DEBUG SMTP: "smtp.gmail.com" to host, port 587, ISLL false 04-23 21: 21: 41.526: D / Android runtime (27546): VM is shutting down   

Logkat:

  04-23 21: 25: 53.651: E / Android Random (28125): java.lang IllegalStateException: The method of operation could not be executed 04-23 21: 25: 53.651: E / Endrumi Druntime (28125): Reason by: java.lang.reflect.InvocationTargetException 04-23 21: 25: 53.651: E / Android Random (28125): On Android. $ View.View $ 1.onClick (View.java3964) Clicking this is a button 04-23 21: 25: 53.651: E / Android Random (28125): Because of this: Android.OnNetworkOnmanTrade Exception 04-23 21: 25 : 53.651: E / Android TimeTime (28125): Thanks to com.javapapers.android.androidjavamail.!   

>

"Network onMinethread Expression" Any network operating on the thread must be implemented. This can ANR if you work on the mainstream like activity, service, etc. Please use "Asinca Task" or "Intent Service" to send email.

Please see this answer.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -