<?php
 
use Shared\Utilities\Mail\SendMail;
 
$logo = 'world1.png';
 
$html = <<<EOT
 
          <html>
 
            <style>
 
              body
 
              {
 
                font-family           : tahoma, verdana, arial;
 
                font-size             : 12pt;
 
              }
 
            </style>
 
            <body>
 
              <h3>$title</h3>
 
              <div>
 
                <br>
 
                Please see the attached which was processed and distributed by [SOME APPLICATION].
 
                <br>
 
                <br>
 
                You have received this email because you are on one of its distribution lists ([THIS PARTICULAR ONE]); please contact
 
                <a href="mailto:[email protected]?subject=Mailing List">HELP ME</a> if you would like to be removed.
 
                <br>
 
                <br>
 
                Thank you.
 
                <br>
 
                <br>
 
                <br>
 
                <br>
 
              </div>
 
              <img alt="[THIS COMPANY'S LOGO]" border="0px" src="cid:$logo">
 
            </body>
 
          </html>
 
EOT;
 
$text = <<<EOT
 
                Please see the attached which was processed and distributed by [SOME APPLICATION].
 
 
 
                You have received this email because you are on one of its distribution lists ([THIS PARTICULAR ONE]); please contact
 
                HELP ME ([email protected]) if you would like to be removed.
 
 
 
                Thank you.
 
EOT;
 
try
 
{
 
  $mail               = new SendMail();
 
  $mail->attachments  = 'c:/program files/apache24/icons/up.gif';
 
  $mail->attachments  = 'c:/program files/apache24/icons/README.html';
 
  $mail->embedded     = 'c:/program files/apache24/icons/' . $logo;
 
  $mail->recipients   = 'Me <[email protected]>';
 
  $mail->recipients   = 'You <[email protected]>';
 
  $mail->subject      = 'SendMail Test';
 
  $mail->html         = $html;
 
  $mail->text         = $text;
 
  $mail->send();
 
} catch (Exception $exception) {
 
  echo '<pre style="font:11px courier new; text-align:left;">' . print_r($exception->getMessage(), true) . '</pre>';  
 
} finally {
 
  echo '<pre style="font:11px courier new; text-align:left;">' . print_r($mail, true) . '</pre>';
 
}
 
 
 |