0

I tried to implement the sending of emails without user intervention as explained in a post that's open for this issue: Sending Email in Android using JavaMail API without using the default/built-in app but I did not send the e-mails. I get the following error: "NetworkOnMainThreadException" Can anyone help?

PD. I don´t put this comment in this post because I don't leave, I guess that is closed. Thank you.

Community
  • 1
  • 1
KryNaC
  • 379
  • 4
  • 21

1 Answers1

3

you can not perform network operation in main Thread.. Use asyncTask instead

stinepike
  • 54,068
  • 14
  • 92
  • 112
  • StinePike thank you very much, I've solved the problem after 1 week with this error. In fact, in the post I mentioned, I saw the response of the AsyncTask but I missed by not knowing it could be that the solution to my problem, as I have said I realized that I had read as was done with AsyncTask. Thank you. – KryNaC May 14 '13 at 15:33