<?php
//include 'debug.php';
include 'SMTPs.php';
$objSMTP = new SMTPs ();
// Be sure to set variables in the configuration file SMTPs.ini.php used by SMTPs.php
$body = "<p>This is the <b>HTML portion</b> of the mixed message.</p>"; //Can't use html that includes quotes
echo "HTML: ".$body."<hr>";
# Text Version
$msg = str_replace("<br>", "\n", $body);
$msg = str_replace("<p>", "\n\n", $msg);
$msg = str_replace("<BR>", "\n", $msg);
$msg = str_replace("<P>", "\n\n", $msg);
$msg = str_replace("<br />", "\n", $msg);
$text .= strip_tags($msg);
echo "Text: ".$text."<hr>";
$objSMTP->setDebug(true);
$objSMTP->setConfig('./SMTPs.ini.php');
$objSMTP->setFrom ( 'Randy Martinsen <randym56@hotmail.com>' ); //using a name and properly formed e-mail lowers spam count by .1
$objSMTP->setTo ( 'Randy <randymartinsen@yahoo.com>' );
$objSMTP->setCC ( '' );
$objSMTP->setBCC ( '' );
$objSMTP->setSubject ( 'an interesting Subject' );
$objSMTP->setBodyContent ($text);
$objSMTP->setBodyContent ( $body, 'html' );
$objSMTP->sendMsg();
echo ('<hr />Processed<br>' . $objSMTP->getErrors());
//do_print_r ( $objSMTP );
?>
|