How It (Web hosting provider) Works You added a couple of
How It Works You added a couple of new lines to the variable $headers. This allows you to do many additional things with your e-mail, including adding HTML. This line is required in order to use extended MIME capabilities (such as HTML). $headers = MIME-Version: 1.0rn ; Note the rn. This is a carriage return and new line, which must be entered between each header. UNIX sometimes allows just n, but to be on the safe side, you should always use rn. The following indicates that you will be using HTML in your message: $headers .= Content-type: text/html; charset=iso-8859-1rn ; $headers .= Content-Transfer-Encoding: 7bitrn ; It is concatenated to the $headers variable. That s all there is to adding HTML to your messages. All you have to do is tell the e-mail client to expect HTML, and it will work. You can really get fancy now with tables, style sheets, images, and so on. However, there is still a concern what about e-mail programs that don t accept or recognize HTML? What happens to them? You certainly want this application to be as user-friendly as possible, right? Not to worry you ll take care of them with multipart (or mixed) messages. Multipart Messages You want to be able to send your postcards to anyone. However, some people don t have HTML capabilities in their e-mail client. Therefore, you will send your postcards using both plain text and HTML. Try It Out Multipart Messages To send messages with both plain text and HTML, you will use Multipart Messages. Here s how to do it: 1. Edit your copy of postcard.php in your favorite text editor. Back up postcard.php before making changes if you want to keep the old version. 2. Make the following modifications (shown highlighted) to postcard.php: