Contents

 
Home
PHPRunner 6.0 manual
Prev Page Next Page
 
 

Send a simple email

 

To send a simple email use Send simple email action.

step11-1

yellowbulbNote: Change the values listed in red to match your specific needs.

// ********** Send simple email ************

$email="test@test.com";

$from="admin@test.com";

$msg="Hello there\nBest regards";

$subject="Sample subject";

$ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, 'from'=>$from));

if(!$ret["mailed"])

  echo $ret["message"];

You can send HTML email as well:

// ********** Send HTML email ************

$email="test@test.com";

$from="admin@test.com";

$msg="Hello there\nBest regards";

$subject="Sample subject";

$ret=runner_mail(array('to' => $email, 'subject' => $subject, 'htmlbody' => $msg, 'charset' => 'UTF-8', 'from'=>$from));

if(!$ret["mailed"])

  echo $ret["message"];

More info on runner_mail function.

Converted from CHM to HTML with chm2web Standard 2.85 (unicode)