Use PHP to send MIME mail (6 ). The other two limodou methods are print_mail () and send_mail (), both of which use the force parameter. Print_mail () outputs the entire email information. send_mail () uses php (as the current main limodou
The other two methods are print_mail () and send_mail (), both of which use the $ force parameter. Print_mail () outputs the entire email information. send_mail () uses the mail () function of php (as the mainstream development language) to send information. (Optional) send_mail () uses an SMTP object and its sending method (specified by the user) to send emails.
Conclusion
Creating a MIME-compliant information is not as complex as it looks, and can be implemented in a rather simple way. MIME messages can bring new weather to many sites.
The class we developed above covers the core idea and can be expanded. The only restriction is your imagination. For example, someone can write the detach () function to delete the attachment of the specified index (the attach () method can return this information ).
This MIME_mail class can be used to send HTML-based emails without modification, but embedded images cannot be sent. this is
Topics that require special attention.
However, HTML without images or referenced images use absolute URLs or You can also use the MIME_mail class to send the flag. I
Example:
$ Html_data = Hello ;
$ Mime = new MIME_mail ($ to, $ from, $ subject );
$ Mime-> attach ($ html_data, "", OCTET, BASE64, INLINE );
$ Mime-> send_mail ();
?>
The recipient of this email will receive an email with a black background and blue "Hello" text!
It is worth special consideration to send complete in-line HTML information, along with other advanced topics for MIME-compliant mail sending. We hope these will become the continuation of this article.
For the MIME_mail class, you can download the zip package here for constant files and running instances.
The other two methods that the http://www.bkjia.com/PHPjc/509089.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/509089.htmlTechArticlelimodou is worth noting are print_mail () and send_mail (), both of which use the force parameter. Print_mail () outputs the entire email information. send_mail () uses php (as the current master...