View Full Version : PHP Newsletter App

03-11-2007, 06:44 PM

I am creating a newsletter app in php. Another newsletter php app that i have come accross lets you send Text and HTML emails. But on the signup form you dont have to select text or html! Some how when it gets there if the email does not support HTML it will revert to the TEXT version! Im completely stuck!!! Does anyone know how this is done? Thanks In Advance!

~ The-Dream

03-11-2007, 07:11 PM
Please Help!

03-11-2007, 07:17 PM
Have some patience, it has not even been 30 minutes since you posted the question.

Short answer, you send both a HTML text body and a plain text body and the email client displays the one it can or the one the user has selected.

03-11-2007, 07:21 PM
How would i get is to send 2 bodys of the email???

03-11-2007, 07:37 PM
I personally us the phpmailer class - http://phpmailer.sourceforge.net/ to do this form me.

There is an example in the documentation.

I have not traced through the code, but I suspect it involves mime boundaries and content type headers.