Phpmailer is a great open source messaging class, and it's very simple to use, but for a virtual host, there are always restrictions. Just now I encountered an "SMTP error:could not connect to SMTP host" error using Phpmailer on a virtual host. Here are two ways to fix this:
(1) The server cannot send mail using SMTP
Workaround: Many sites listed the solution is because of the SMTP case, although the nature of the problem is not here, but do need to change this place, as for why, look at the following operation.
In class.phpmailer.php, you will:
function Issmtp () {$this->mailer= ' SMTP ';}
Change to:
function Issmtp () {$this->mail
(1) The server cannot send emails using smtp.
Solution: the solution listed by many websites is due to the smtp case sensitivity problem. Although the problem is not here in essence, it must be changed. For the reason, refer to the following operations.
In class. phpmailer. php, set:
function IsSMTP(){$this->Mailer='smtp';}
Changed:
function IsSMTP(){$this->Maile
Cause analysisIf this problem occurs, the name of the SMTP host Solution: It depends on the email payment does not support sending and receiving mails by pop3. This can be viewed officially by email, such as QQ mail.Phpmailer error SMTP Error: cocould not connect to SMTP host
SMTP error:could not connect to SMTP host.
I use the Web page runtime Normal, can send, with the command to run PHP file times wrong, the main code is checked correctly, as follows
function SendMail ($setEmail, $setName, $body, $subject) {Require_once ("phpmail/phpmailer.php");$mail = new Phpmailer (true); The true param means it would throw exceptions on errors
Php PHPMailer sends an Email and cannot connect to the host because the fsockopen function is disabled. PHPmailer sends an Email based on this function.
Modify:
Class. stmp. php
Solution:
1:
Row 3:
$ This-> smtp_conn = fsockopen ($ host, // the host of the server
Changed:
$ This-> smtp_conn = pfsockopen ($ host
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
PHP phpmailer sends an email and cannot connect to the host because the fsockopen function is disabled. phpmailer sends an email based on this function.
Modify:
Class. stmp. php
Solution:
1:
Row 3:
$ This-> smtp_conn = fsockopen ($ host, // the host of the server
Changed:
$ This-> smtp_conn = pfsockopen ($ host
HiChina hosts all seem to need to send emails through SMTP, and enable fsockopen. However, the SMTP sending method of WordPress is steam_connect_client instead of fsockopen.
HiChina hosts all seem to need to send emails through SMTP, and to enable fsockopen (this can be enabled in HiChina background. if not, please contact HiChina customer service ). But the
#---------------------------------------------------------------------- --------------
# Encryption key cannot be given
# The username and password are encrypted and decrypted tools are in the Desutil
#--------------------------------------- ---------------------------------------------
#登陆用户名 I wrote it casually,
mail.smtp.username=. cboch2llydmw2432vyrede4tjvjrstamcoe123111
#密码 QQ for authorization code 111111 I wrote it casually
mail.smtp.password= avq5jebimunr5f4wcllzza==
problems encounte
Using DEDECMS to customize a Send mail php file, using the dedecms comes with mail.class.php, can be sent locally, after uploading to the server, prompted cannot connenct to relay host Smtp.qq.com Error: () error:cannot send email to [email protected] online to find a lot of articles, finally solved, the problem is in the server environment configuration. Find php.ini, see two places, one is Allow_url_fopen, this place is to be set to on, and the othe
ArticleDirectory
1. overhead of querying a route table
3. 1. Contact
3. 2. Differences
1. Route table
Route information is stored on the host or professional router used for the router. The route table is used to store the information. It contains three e
After the system service is turned on, you cannot view the connection success via Web page or eclipse, and connect to the Times error:
Java.net.NoRouteToHostException:No Route to host
The findings of the Internet search are as follows:
There are no routes connecting to this computer, the remote host cannot be reached,
Cause: Firewall interference or intermedi
Once in http://blog.csdn.net/bisal/article/details/42496583 this post mentions the authentication of a port connection:
"Ora10g@localhost.localdomain$telnet 172.101.19.57 1521Trying 172.101.19.57 ...Telnet:connect to address 172.101.19.57: No route to hostIf the port is not open, the actual error:Ora10g@localhost.localdomain$telnet 172.27.19.56 1521Trying 172.27.19.56 ...Telnet:connect to address 172.27.19.56: Connection refusedis not the problem of t
Set up dual-host interconnection for Vista and XP Wireless route connections. First, go to the network and sharing center under the vista system and click set connection or network. For example, select set wireless temporary computer to computer) network, select next.
Wireless route connection settings
In the following window, select next.
Wireless
Once in http://blog.csdn.net/bisal/article/details/42496583 this blog post mentions the authentication of a port connection:“[email protected] $telnet172.101.19.571521Trying172.101.19.57...Telnet:connect to address172.101.19.57:No route to hostif the port is not open, the actual error:[email protected] $telnet 172.27.19.56 1521Trying 172.27.19.56 ...Telnet:connect to address 172.27.19.56:Connection refusedis not the firewall problem??? To shut down th
exchange of open source spirit, gathered in the Internet and personal learning work of the essence of dry knowledge, everything to the Internet, feedback back to the Internet.Current research areas: Big data, machine learning, deep learning, artificial intelligence, data mining, data analysis. Languages include: Java, Scala, Python, Shell, Linux, and more. It also covers the usual use of mobile phones, computers and the Internet using tips, problems and practical software. As long as you focus
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.