Note that there are some explanatory texts on larger screens.

plurals
  1. POautomated email sending failure
    primarykey
    data
    text
    <p>I am using <a href="http://www.jondev.net/articles/Sending_Emails_without_User_Intervention_%28no_Intents%29_in_Android" rel="nofollow">this article</a> to help me send automated emails, but I am having an issue in which nothing seems to be happening and no errors are generated.</p> <p>I used AsyncTask but it is not sending the mail at all.</p> <blockquote> <p>public class Sender extends AsyncTask&lt; Void, Void, Void> {</p> <pre><code> private Exception exception; protected Void doInBackground(String... arg0) { Log.v("aws", "OPEN asa"); Mail m = new Mail("email@email.com", "password"); String[] toArr = {"to@mail.com"}; m.setTo(toArr); m.setFrom("from@gmail.com"); m.setSubject("This is an email sent using my Mail JavaMail wrapper from an &gt;Android device."); m.setBody("Email body."); try { //m.addAttachment("/sdcard/filelocation"); if(m.send()) { Log.v("aws", "OK SENT"); } else { Log.v("aws", "NOT SENT"); } } catch(Exception e) { Log.v("aws", "EXCEPTION . NOT SENT"); } return null; } @Override protected Void doInBackground(Void... arg0) { // TODO Auto-generated method stub return null; } protected void onPostExecute(Void... arg0) { // TODO: check this.exception // TODO: do something with the feed } </code></pre> <p>}</p> </blockquote> <p>I have used <code>new Sender().execute();</code> to execute the task, but nothing is happening and no errors are being thrown.</p> <p>What am I doing wrong?</p> <p><strong>EDIT</strong></p> <p>Code has two <code>doInBackground</code> such that second overridden my working <code>doInBackground</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload