<?php
require("./mail.php");
$htmlexample = <<<EOF
<html>
<body>
<div style="font:10pt Verdana;">This is the example email</div>
</body>
</html>
EOF;
$testmail = new mimemail();
$testserver = new smtpmail("shawmail");
$testmail->addrecipient("darksnoopy@shaw.ca", "To");
$testmail->setsender("example@test.com", "A. J. Somebody");
$testmail->setreturn("darksnoopy@shaw.ca");
$testmail->setsubject("This is my example email");
$testmail->sethtml($htmlexample);
// This call is unnecessary, as if it is not made, the same thing
// will be send as plain text anyways.
$testmail->setplain("This is the example email.");
$testmail->addattachment("./mail.php");
$testmail->addattachment("Test.txt", "This is my example attachment");
$testmail->compilemail();
$testserver->openconnection();
$testserver->sendmail($testmail->headers, $testmail->message);
$testserver->closeconnection(); ?>
|