【分享:PHP發送郵件SMTP類】解決方案

來源:互聯網
上載者:User
【分享:PHP發送郵件SMTP類】
免費分享地址:http://download.csdn.net/source/2507571

這是從PHP168系統中分離出來的SMTP發送郵件類,很好用的。配置好郵件伺服器的相關資訊,即可成功發送郵件。
部分代碼:
PHP code
require_once("class.mail.php");/***伺服器資訊*/$MailServer = 'mail.tulou.com';  //SMTP 伺服器$MailPort = '25';                //SMTP伺服器連接埠號碼 預設25$MailId = [email protected]';  //伺服器帳號$MailPw = '123456';              //伺服器帳號密碼/***用戶端資訊*/$Title = '測試郵件標題'; //郵件標題$Content = '測試郵件內容'; //郵件內容$email = [email protected]';//接收者郵箱$smtp = new smtp($MailServer,$MailPort,true,$MailId,$MailPw);$smtp->debug = false; //執行個體化類$smtp->sendmail($email,$MailId, $Title, $Content, "HTML") //發送郵件


------解決方案--------------------
不錯,收藏了!~
------解決方案--------------------
呵呵!
------解決方案--------------------
很好....
------解決方案--------------------
呵~ ,本地測試的時候能用嗎?
------解決方案--------------------

用著呢 幫忙頂一下,,,
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.