![]() ![]() = "Content-Type: text/html charset=ISO-8859-1\r\n" Now We Can Use HTML Tags Here is the code used for the new and improved HTML-Sendin’ Website Change Request Form: $to = ' ' ![]() This is where we can set the From: and Reply To: settings if need be, as well as CC and BCC other recipients ( Hey, a checkbox for CC’ing yourself would be a cool feature to add!). In fact, the headers area gives us the opportunity to do lots of important email functions. The last parameter, the headers, are optional for the function but required for sending HTML email, as this is where we are able to pass along the Content-Type declaration telling email clients to parse the email as HTML. Sending HTML Email through PHP uses the exact same mail function as text email: mail($to, $subject, $message, $headers) We’re going to improve that output, and make the email into a nicer looking HTML-formatted email. Throughout all of this, the end result has been a boring text-only email that gets sent to a single email address. If you need to catch up, first I talked about it, then I built it, then I screencasted it, then I secured it. This is going to be a continuation of the Website Change Request Form demo we’ve been using around here for a while. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |