This is a update to How to send email without a 'Compose' prompt.
The method is the same, except that instead of downloading that sendemail.py, download this sendemail_android.py.
The code is the same except for the very end where tasker-specific code is added (and non-tasker code is removed. This script will NOT work from the terminal like the old one).
How to use
Assuming you already added your email information to the code (see How to send email without a 'Compose' prompt for that).
- Add the script to sl4a/scripts/
- In Tasker, set 3 variables name "%tomail", "%subject", and "%body" for the recipient email address, the subject and the body respectively. NOTE: By default, they HAVE to be named that. You will need to change the code otherwise.
- Add a "Run Script" task, select sendmail_android.py and pass the three variables, separated by commas, as parameters. NOTE: The order matters. MUST be "%tomail, %subject, %body"
Now when you run the task, the email will be sent.