PHP send a message in detail, PHP sent a detailed message
PHP implementation to send mail, commonly used is open source project Phpmailer to achieve, then besides, what other good project?
Workaround:
Use the SMTP protocol to send mail.
Send mail in CodeIgniter using its built-in message class
$this->load->library (' email '); $to = "aa@bb.cc"; $subject = "Test"; $message = "hello!"; $config ["Protocol"] = "SMTP", $config ["smtp_host"] = "smtp.163.com"; $config ["Smtp_user"] = " Username@163.com "; $config [" Smtp_pass "] =" password "; $config [" Mailtype "] =" html "; $config [" Validate "] = true; $config ["priority"] = 3; $config ["CRLF"] = "/r/n"; $config ["smtp_port"] =; $config [" CharSet "] =" Utf-8 "; $config [" WordWrap "] = TRUE; $this->email->initialize ($config); $this->email- >from (' xxxx@163.com ', ' xxxx '); $this->email->to ($to); $this->email->subject ($subject); $this->email->message ($message); $this->email->send ();
Sending a message this way does not require any software, but it requires you to write more code and be familiar with SMTP.
But if you don't write it yourself, but use the ready-made code that someone else has written, it's certainly the easiest way to do it:
You don't need to build your own SMTP server, and you don't need to write a lot of code.
Summarize:
PHP now comes with the Mail () based on the SendMail Mail () function, but only if the server must be installed SendMail, many server space vendors are not installed SendMail mail server. So there is a certain limit to this.
So there are a lot of open-source components based on SMTP to send mail, the most famous should be Phpmailer, this you already know I will not say more, I say here other ways.
1, Xpertmailer: This is also open source PHP to send mail components, and Phpmailer similar, is also very convenient, here is its official website (http://xpertmailer.sourceforge.net/), I personally tested, really very good.
2. Jmail:jmail is a component under Windows, but PHP supports calling it through COM, which is also a solution, but only if the Web server can be considered if it is running in Windows, otherwise forget it.
3, the Internet has a lot of people write SMTP-based mail class, but also can be used, but the support features are relatively simple. If the requirements are not high, you can also consider.
4, there are 20 more famous open source PHP to send mail components, I did not one by one tested, do not express their views. You can try it yourself. Put the address here:
Introducing 20 php Email mail Open source projects
The above mentioned is the whole content of this article, I hope you can like.
http://www.bkjia.com/PHPjc/1020537.html www.bkjia.com true http://www.bkjia.com/PHPjc/1020537.html techarticle PHP Send a message to explain the problem, PHP send a message in detail PHP implementation to send mail, commonly used is open source project Phpmailer to achieve, then besides, what other good project?