<?php
include('Mail.php');
include('Mail/mime.php');
$text = 'Text version of email';
$html = '<html><body>HTML version of email<br><img src="mm.jpg"></body></html>';
$file = 'c:/php/news.txt';
$crlf = "\r\n";
$hdrs = array(
'From' => 'test@host',
'TO' => 'to@host',
'Subject' => 'Test mime message'
);
$mime = new Mail_mime($crlf);
$mime->setTXTBody($text);
$mime->setHTMLBody($html);
$mime->addHTMLImage('i:\mm.jpg');
$mime->addAttachment($file, 'text/plain');
$body = $mime->get();
$hdrs = $mime->headers($hdrs);
/*
smtp
$param["host"] - The server to connect. Default is localhost
$param["port"] - The port to connect. Default is 25
$param["auth"] - Whether or not to use SMTP authentication. Default is false
$param["username"] - The username to use for SMTP authentication.
$param["password"] - The password to use for SMTP authentication.
*/