Home > Backend Development > PHP Tutorial > PHP邮件扩展:mailpp

PHP邮件扩展:mailpp

WBOY
Release: 2016-06-23 13:42:54
Original
1777 people have browsed it

你还在使用PHPMailer吗?out了吧!

mailpp是用C++写成的一个PHP扩展,专门用来执行发送邮件的任务。

class mailpp {    public function __construct();    public function set_host_port($host,$port) ;    public function set_user_password($user,$password);    public function set_content_type($content_type);    public function set_subject($subject);    public function set_from($from,$fromname);    //totype:{PRIMARY,CC,BCC}    public function set_to($to,$totype,$toname);    public function set_body($body);    public function send();    public function send_by_tls();    public function send_by_ssl();            }
Copy after login

接口一目了然。

用法很简单:
$mailpp = new mailpp();$mailpp->set_host_port($__config__["email"]["smtp"], $__config__["email"]["port"]);$mailpp->set_user_password($__config__["email"]["user"], $__config__["email"]["password"]);$mailpp->set_content_type("HTML");$mailpp->set_from($__config__["email"]["from"], $__config__["email"]["name"]);$mailpp->set_to("****@qq.com", "BCC", "QQ1");$mailpp->set_to("****@163.com", "BCC", "163");$mailpp->set_to("****@qq.com", "CC", "QQ2");$mailpp->set_to("****@gmail.com", "PRIMARY", "GMAIL");$mailpp->set_subject("抄送,密送功能");$mailpp->set_body("<html><head></head><body><p>mailpp发邮件!</p></body></html>");$ok = $mailpp->send_by_ssl();
Copy after login

mailpp提供三种发送方法:send,send_by_ssl,和send_by_tls。可根据具体配置自行选择。

下载地址:http://www.wqbuyer.com/demo/blog/3.html.


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template