Personal web server - The HTML portion of your e-mail follows. Note

The HTML portion of your e-mail follows. Note the double dashes (–) in front of the boundary. Also note the use of two new lines (nn) on the Content-Transfer-Encoding line. Do not neglect those the code will not work correctly without them. $message .= –$boundaryn ; $message .= Content-type: text/html; charset=iso-8859-1n ; $message .= Content-Transfer-Encoding: 7bitnn ; $message .= $messagebody . n ; Next is the text portion of your e-mail. Note the similarity to the HTML portion. You do not need to include the same $messagebody here. In fact, you would usually include an alternate message in text format. $message .= –$boundaryn ; $message .= Content-Type: text/plain; charset= iso-8859-1 n ; $message .= Content-Transfer-Encoding: 7bitnn ; $message .= $messagebody . n ; This is the final boundary. Note the double dashes (–) at the end. This signifies that it s the end of the e-mail. $message .= –$boundary– ; Your boundary in this case was set by the following line: $boundary = ==MP_Bound_xyccr948x== ; Storing Images To create a postcard application, you need to have digital postcards available for the user to choose from. For the purposes of this example, you ll have four postcards. If you are ambitious, you can add more, and we hope that you will! Try It Out Storing Images Let s add some nice postcards to the application, shall we? You can create your own, or you can download the images from the Web site (www.wrox.com). 1. First, store your postcard images in a folder on your Apache server. We have ours in the folder postcards/. Place them anywhere you like, but remember where they are. 2. Start up your favorite PHP editor, and type the following code. Make sure you enter your own server, username, password, and database name: 337 Sending E-mail
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Leave a Reply