PHP發送郵件,php發送郵件代碼_PHP教程

來源:互聯網
上載者:User

PHP發送郵件,php發送郵件代碼


PHP發送郵件代碼

php//使用網吧資料介面,發送郵件php demo//本程式,你只需要改配置值,然後直接運行即可//=======//配置程式//=======#網吧資料KEY$key    =    '14297580222735684725947490211595';# smtp伺服器位址, 如smtp.qq.com$host = 'smtp.qq.com';# 寄件者名稱$fromname = '暱稱隨便定義';# 寄件者郵箱帳號$username = 'QQ郵箱帳號';# 寄件者郵箱密碼$passwd = 'QQ郵箱密碼';# 收件者郵箱帳號$to = '3039439790@qq.com';# 郵件標題$subject = '標題,您好!';# 郵件內容,可以寫HTML,等$email = '內容,您好,這是我們為您準備的內容。';//=======//邏輯處理常式//=======$subject    =    urlencode($subject);$email    =    urlencode($email);$handle = fopen ("http://www.zgw8.com/api.php/SendMail/Index/key/".$key."/language/xml/smtp/".$host."/fajianrenmingcheng/".$fromname."/fajianrenyouxiang/".$username."/fajianrenyouxiangmima/".$passwd."/shoujianrenyouxiang/".$to."/youjianbiaoti/".$subject."/youjianneirong/".$email, "rb");$contents = "";while (!feof($handle)) {    $contents .= fread($handle, 8192);}fclose($handle);function simplest_xml_to_array($xmlstring) {    return json_decode(json_encode((array) simplexml_load_string($xmlstring)), true);}//=======//擷取到結果的程式//=======//傳回值數組$arr    =    simplest_xml_to_array($contents);//列印數組print_r($arr);?>

http://www.bkjia.com/PHPjc/1040162.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1040162.htmlTechArticlePHP發送郵件,php發送郵件代碼 PHP發送郵件代碼 meta http-equiv="Content-Type" content="text/html; charset=utf-8" /? php // 使用網吧資料介面,發送郵件php...

  • 聯繫我們

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