Cause analysisIf this problem occurs, the name of the SMTP host cannot be resolved.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
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)
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
Python uses the smtplib method of the email module, pythonsmtplib
Smptp class definition: smtplib. SMTP (host [, port [, local_hostname [, timeout]) is used as the SMTP constructor to establish a connection with the smtp server. After the connection
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, //
problems with Java when sending mail
The company has recently upgraded its messaging system, and after the upgrade, mail must be encrypted with a message transmission channel. That is, SSL login.
Normal logins that were previously written will also
(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
Before doing a project to do a phpmailer to send mail with the function of "CI framework combined with phpmailer send mail", yesterday step on the line (just start with Sina cloud, too expensive, replaced by Ali), the test, send an email
(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
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
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, //
Copy Code code as follows:
/*phpmailer is a PHP function package that is used to send e-mail. The features it provides include:
*. Specify multiple recipients, CC addresses, dark addresses, and reply-to addresses when sending mail
*. Support
SMPTP class definition: Smtplib. SMTP (Host[,port[,local_hostname[,,timeout]]), as the constructor of SMTP, the function is to establish a connection with the SMTP server, after the successful connection, you can send related requests to the server,
SMPTP class definition: Smtplib. SMTP (Host[,port[,local_hostname[,,timeout]]), as the constructor of SMTP, the function is to establish a connection with the SMTP server, after the successful connection, you can send related requests to the server,
Python's Stmplib module enables the sending of messages, which can be emulated by an SMTP client. The python2.3 or later version defaults to the Smtplib module, eliminating the need for additional installation.I. Common classes and methods of
Earlier we used Mail.jar and Activation.jar two packages to write the code to send emails, although not difficult, but troublesome. Now the Apache site has a jarkata/commons/email subproject, but also for us to achieve the function of sending email,
Javamail is Sun's application interface for email processing. It provides some of the most common implementation methods for mail transfer protocols and provides easy methods to call them. Javamail is an application interface released by Sun, so it
In PHP development and utilization of Phpmailer send mail is a common practice, this is more useful than PHP mail, let's see how phpmailer send email with attachments.
. First download the latest version of the package to
Example of sending an email with attachments using PHPMailer
/**
* PHPMailer email sending
* Edit bbs.it-home.org
*/
Require_once ('include/PHPMailer/class. phpmailer. php'); // import the
Send email via python (1)
Send email via python (1)
Recently, a small application was designed to send an excel file based on the email address in the file, and the recipient received the mail in a webpage format.
The following is a summary of
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.