I am trying to collect data from a form, store that data in mysql database, and send the info in an html mail (so the info looks "pretty"). I have everything working except for the HTML mail. I have read numerous things and tried numerous things, but so far, noting works. I checked to make sure that i could send and receive email using php (on a text only email) and that was ok. but whenever i try to include html in the mail, i get errors or nothing happens (depending on which method i tried). if anyone can tell me how to send html email, i would greatly appreciate it because so far, everything i have tried doesn't work.
lightningrod66
0
Newbie Poster
Recommended Answers
Jump to PostBelow is an example of how to do so.
// To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail($to, $subject, $message, $headers);
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.