Auto Send Email

I wanted missed call notifications and all text messages to be forwarded to my inbox — since I turn my phone on silent and vibrate is off while I am at work. This method requires access to a webserver that will allow you to run a sendmail script. In the case shown below, we use the native PHP sendmail protocols, but you can use any scripting language.

Below is the text of the PHP script, saved as "maildroid.php" and in the root directory of your server. The $headers give a "From" value of "DROID" so that you could create a label in Gmail if you decide to archive or filter and do something with them later, but you could just as easily make the "From" value be the actual sender/caller. (ie., $headers = "From: " . $_POST["sender"]; )


$to = "";
$headers = 'From: DROID';
if ($_POST["type"] == "text") {
        $subject = "SMS from ". $_POST["sender"];
        $message = $_POST["text"];


if ($_POST["type"] == "missedcall") {
        $subject = "Missed Call from ". $_POST["sender"];
        $message = "No text to read, just check your voice mail or call them
back when you get a chance!";

if (mail($to, $subject, $message, $headers)) {
 } else {

Once you have this set up, you need to create two new Profiles within Tasker. One I called Missed Call Mail and one called SMS Mail.

(1) Context Event: Phone -> Missed call
(2) Task Action: Net -> HTTP Post
Path: maildroid.php
Data: type=missedcall
Timeout: 30
Content Type: application/x-www-form-urlencoded
If: %VOLR < 2

NOTE: I set the "If" parameter to check if the volume of the ringer is less than 2 but you can change it so that it checks if it's equal to 0 if you only want it to be activated when sound is completely silent.

(1) Context Event: Phone -> Received SMS
(2) Task Action: Net -> HTTP Post
Path: maildroid.php
Data: type=text
Timeout: 30
Content Type: application/x-www-form-urlencoded
If: %VOLN < 2

This is a good task, but sadly, if you do not have your own email server may not be possible.
I have used this in conjunction with the sendemail in SL4A. That really works well.
There are some teetering troubles while using SL4A too. The trick is to get tasker to refresh the variables like CNUM etc everytime you get a call. So I have set up a dummk task which just flashes the values of CNUM and CTIME. After the flash, I send this as an Email usinkg sendemail python script of SL4A

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