Phpmailer sending a message with host unreachable (Could not connect to SMTP host) _php tutorial

Source: Internet
Author: User
PHP Phpmailer Send the message, there is no connection to host, this is because the Fsockopen function is disabled, Phpmailer send email dependent on this function.

Modify:


class.stmp.php


Solve:

1:


118 lines:


$this->smtp_conn = Fsockopen ($host,//The host of the server

Switch

$this->smtp_conn = Pfsockopen ($host,//The host of the server


2:


Files: class.phpmailer.php

291 lines:

Public Function issmtp () {
$this->mailer = ' smtp ';
}

Switch


Public Function issmtp () {
$this->mailer = ' SMTP ';
}


http://www.bkjia.com/PHPjc/477185.html www.bkjia.com true http://www.bkjia.com/PHPjc/477185.html techarticle PHP Phpmailer Send the message, there is no connection to host, this is because the Fsockopen function is disabled, Phpmailer send email dependent on this function. Modified: class.stmp.php Resolved: 1:118 lines: ...

  • Related Article

    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.