How to automatically send emails with parameters (no config file)

This is a update to How to send email without a 'Compose' prompt.

The method is the same, except that instead of downloading that, download this

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 and pass the three variables, separated by commas, as parameters. NOTE: The order matters. MUST be "%tomail, %subject, %body"
  • Done

Now when you run the task, the email will be sent.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License