Sending HTML Mail via SMTP with PHP Pear Mail


Posted by Andrew McCombe on Wed May 30, 2012

Pear Mail Mime Example

Here’s how to send html email via remote SMTP using PHP and Pear Mail / Mime.

Installing Pear Mail

To install the classes you should enter (as a superuser):

Pear Mail Mime Example

The following code shows how to send an HTML mail using Pear classes over SMTP.