Location: PHPKode > scripts > dSendMail2 > dsendmail2-2-0/example-CustomHeaders.php
<?php
require_once "dSendMail2.inc.php";

// First of all: DISABLE TIME LIMIT and IGNORE USER ABORT! You really don't want to be interrupted in the middle of this.
set_time_limit(0);
ignore_user_abort(true);


$m = new dSendMail2;
$m->setTo("hide@address.com");
$m->setFrom("hide@address.com");
$m->setSubject("My own headers");
$m->setMessage("Here goes my message, through SMTP server.");

// Here goes your headers:
$m->headers['My-Header'] = "My Value";
$m->headers['Reply-To']  = "hide@address.com";

$m->send();
Return current item: dSendMail2