Sending Mail, Attachments, HTML Email with PHP
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
There's a great tutorial on how to construct complex emails with PHP. While the standard PHP mail() function lets you generate standard text emails, with CC, BCC, To, From, Subject, and Body, these more advanced techniques allow you to generate more complex emails. More on this method at zend.com

The PHP class used is PHP Mime Mail (Download)

:: Quote ::
HTML Mime Mail is a very useful PHP class created and maintained by Richard Heyes, phpguru.org. Available for free download and use under the BSD license, it's a fantastic class for sending MIME-based e-mail. Offering an intuitive OOP syntax for managing e-mail submissions, it's capable of executing all of the e-mail-specific tasks discussed thus far, in addition to features such as handling attachments, sending plain-text e-mails, and sending HTML e-mails with embedded images. In this article I'll show you how to take advantage of this great tool.


If you need more complex email management, you can use this type of product:
:: Quote ::
These solutions not only facilitate subscriber management, but also support a wide variety of additional useful features such as auto-responses, Web-based subscription/unsubscription, and Web-based newsletter administration. As you might imagine, several open source software packages are available. I'll highlight two of the most popular packages here:


Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
<added>I recently implemented this script, and it performs flawlessly.

One thing you'll want to be aware of is that the last PHP 4 version is 2.5.1, and that has a slightly different syntax than the instructions on the website, so make sure you read the documentation before setting out. The PHP 5 version cannot be run on PHP 4, which is still what most hosters are running.

This is one of the better written scripts I've come across, and made the project I was doing much more manageable, and also allowed me to add some features I thought might have been more difficult.

Thanks PHP Guru.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours