In IIS + PHP, modify the default sending mode of WordPress to SMTP (no plug-in)

Source: Internet
Author: User
Tags mail account
1. modify the pluggable. php $ phpmailer-IsMail (); changed to $ phpmailer-IsSMTP (); 2. modify the entries var $ Mailersmtp; var $ Hostyoursmtpserver; var $ Port25; var $ SMTPSecure; var $ SMT under the class-phpmailer.php under the wp-schemdes directory

1. modify the pluggable. php $ phpmailer-IsMail (); changed to $ phpmailer-IsSMTP (); 2. modify the entries var $ Mailer = 'smtp '; var $ Host = 'your smtp Server'; var $ Port = 25; var $ SMTPSecure =; var $ SMT

1. Modify pluggable. php under wp-pair des.
$ Phpmailer-> IsMail ();
Change
$ Phpmailer-> IsSMTP ();

2. Modify the entries under the class-phpmailer.php under the wp-des directory
Var $ Mailer = 'smtp ';
Var $ Host = 'your smtp Server ';
Var $ Port = 25;
Var $ SMTPSecure = "";
Var $ SMTPAuth = true;
Var $ Username = 'your mail account ';
Var $ Password = 'your mail password ';

In addition, if anti-virus software, such as McAfee, is installed on the machine, php-cgi.exe is regarded as a worm. Therefore, you need to modify the protection rules:

The above method is actually to connect to the SMTP server through a Socket to send an email (verification method). If it is on the IIS + PHP + Discuz host, there is a graphical webpage setting page for mail settings, the operation is much easier.

Note: if you do not use the authentication method (that is, use anonymous SMTP to send emails), you can send internal emails, but not external emails, the cause of the failure is that the SMTP server password of IIS is not verified when the email is sent.

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.