How does php send HTML-format EDM emails?

Source: Internet
Author: User
There seems to be no relevant code on the Internet. I can see the EDM email sent by sf. I don't know how it works. I feel like I have no idea how to use the mail provided by php, it seems that there is no relevant code on the html code website. I can see the EDM email sent by sf, but I don't know what the related principles are used. I don't feel like I have any idea.

Using the mail provided by php, the code is directly converted into html code.

Reply content:

There seems to be no relevant code on the Internet. I can see the EDM email sent by sf. I don't know what relevant principles are used for this. I feel like I have no idea.

Using the mail provided by php, the code is directly converted into html code.

The php Manual contains examples of sending HTML emails:

   Birthday Reminders for August  

Here are the birthdays upcoming in August!

Person Day Month Year
Joe 3rd August 1970
Sally 17th August 1973
';// 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";// Additional headers$headers .= 'To: Mary , Kelly ' . "\r\n";$headers .= 'From: Birthday Reminder ' . "\r\n";$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";// Mail itmail($to, $subject, $message, $headers);?>

If you use the mail function, you can use a mail proxy such as sendmail, postfix, and exim.

Or use the smtp library phpmailer.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.