php send mail, php send mail code _php tutorial

Source: Internet
Author: User

php send mail, php send mail code


php Send mail code

 
  
 
 Php//use Internet Bar data interface, send mail PHP demo//This program, you only need to change the configuration value, and then run directly to//=======//configuration program//=======#Internet Bar Data Key$key= ' 14297580222735684725947490211595 ';#SMTP server address, such as smtp.qq.com$host= ' smtp.qq.com ';#Sender Name$fromname= ' Nickname casually defined ';#Sender Email Account$username= ' QQ email account ';#Sender Mailbox Password$passwd= ' QQ Email password ';#Recipient's email account$to= ' 3039439790@qq.com ';#message Header$subject= ' title, Hello! ';#mail content, can write HTML, etc.$email= ' content, Hello, this is what we have prepared for you. ';//=======//Logic Handler//=======$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);functionSimplest_xml_to_array ($xmlstring) {    returnJson_decode (Json_encode (Array)simplexml_load_string($xmlstring)),true);}//=======//get to the result of the program//=======//return value array$arr= Simplest_xml_to_array ($contents);//Print ArrayPrint_r($arr);?>

http://www.bkjia.com/PHPjc/1040162.html www.bkjia.com true http://www.bkjia.com/PHPjc/1040162.html techarticle php send mail, php send mail code php send mail code meta http-equiv= "Content-type" content= "text/html; charset=utf-8"/? PHP//Use Internet Café data interface, Send mail php ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    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.