PHP Application Phpmailer Use

Source: Internet
Author: User
Phpmailer is a very useful class to send mail in PHP, it encapsulates a lot of important functions and functions, let us send mail, and adjust the contents of the message becomes very easy, the following gives a Phpmailer test case, easy to use later query.


First, you need to download the Phpmailer class library, which can now be extracted from GitHub.


Download Address: Https://github.com/PHPMailer/PHPMailer


The following program: The use of QQ mailbox to test, need to go to the mailbox inside

Set = "account ="Pop3/imap/smtp/exchange/carddav/caldav service

Tick the POP3/SMTP service.


 
  ISSMTP ();  $mail->smtpdebug = 2;  $mail->host = "smtp.qq.com";  $mail->port = "465";    $mail->smtpsecure = "SSL";  $mail->smtpauth = true;  $mail->username = "470356072";//username  $mail->password = "******";//repalce your Password  $mail Addreplyto ("470356072@qq.com", "Network");  $mail->addaddress ('470356072@qq. com ');  $mail->setfrom ("470356072@qq.com", "Network");  $mail->ishtml (false);  $mail->subject = "Test mail";  $mail->msghtml ("This is a test mail! ");  $mail->send ();  if ($mail->send ()) {      echo "success";    } else {    echo "false";   }? >
  • 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.