I like the pear.
<? include('Mail.php'); include('Mail/mime.php'); $text = 'Text version of email'; $html = '<html><body>HTML version of email</body></html>'; $file = './files/example.zip'; $crlf = "rn"; $hdrs = array( 'From' => ' someone@domain.pl ', 'To' => ' someone@domain.pl ', 'Subject' => 'Test mime message' ); $mime = new Mail_mime($crlf); $mime->setTXTBody($text); $mime->setHTMLBody($html); $mime->addAttachment($file,'application/octet-stream'); $body = $mime->get(); $hdrs = $mime->headers($hdrs); $mail =& Mail::factory('mail', $params); $mail->send(' mail@domain.pl ', $hdrs, $body); ?>
Georg zimmer
source share