How to implement CodeIgniter to send html mail using smtp service
This article mainly explains "how to achieve CodeIgniter using smtp service to send html mail", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "How to realize CodeIgniter to send html mail using smtp service"!
The details are as follows:
email class provided by codeigniter, used to send mail,
wiki address: http://codeigniter.org.cn/user_guide/libraries/email.html
In the actual development encountered the following problems, summarized:
1. Wiki instructions are that configuration files can be brought out separately, email.php placed in the config folder,
For email.php configuration, a few points need to be explained:
1)smtp service used in general test, such as mailbox 126 and 163, all adopt this protocol, so smtp is selected for protocol.
2)Enterprise marketing emails are generally html. In this case, you need to configure mailtype as html.
Below is an example of the email.php configuration file I wrote: