PHP郵件擴充:mailpp

來源:互聯網
上載者:User

標籤:

你還在使用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();            }

介面一目瞭然。

用法很簡單:
$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();

mailpp提供三種發送方法:send,send_by_ssl,和send_by_tls。可根據具體配置自行選擇。

:http://www.wqbuyer.com/demo/blog/3.html.


PHP郵件擴充:mailpp

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.