Jun 11, 2008
HTML Mine Mail for PHP Usage Tutorial
This is a PHP class which allows you to easily send email from your PHP scripts with attachments, HTML and embedded images. If you have a PHP project needs to deal with HTML email with attachments, you’ll definitely want to take advantage of this class.
http://www.phpguru.org/static/mime.mail.html
Be aware that there are 2 different versions for PHP4 and PHP5
<?php // include the class require_once('htmlMimeMail.php'); // initiate an object $mail = new htmlMimeMail(); // define parameters & email content $mail->setReturnPath("eric@leungeric.com"); $mail->setFrom("Eric Leung <eric@leungeric.com>"); $mail->setSubject("This is email subject"); $mail->setHtml("This is <b>HTML</b> email content"); // add attachment $attachment = $mail->getFile("file.zip"); $mail->addAttachment($attachment, , 'application/zip'); // send email to bob@example.com $mail->send("array('bob@example.com')"); ?>


















No Comments, Comment or Ping
Reply to “HTML Mine Mail for PHP Usage Tutorial”