; smtp_conn = fsockopen ($ this-> smtp_conn = pfsockopen (for class. smtp. php (. Restore PHPmailer to normal use3Server errorsSuccessfully established a connection with the remote host, but the other party did not install the SMTP protocol to send a 220 response code, which indicates that the SMTP server may be faulty.4220 the SMTP server responds normally.Okay, whether it's the fsockopen function or the pfsockopen function, it's already connected to a remote SMTP server. If you cannot use PHPm
PHP automatically sends emails, and PHP automatically sends emails.Recently, I did a mailbox verification function. After studying this function for a while, I completed automatic mail sending. The following uses QQ mail as a demonstration and explains it step by step:
Code
First, the Code is as follows:
[Html]View plain copy
// Send email
Require './mailer/class. phpmailer. php ';
Require './mailer/c
The CI framework uses PHPmailer to send an email to retrieve the password, ciphpmailer
Previously, PHP + Mysql + jQuery combined with ThinkPHP provided a user-verified mailbox password retrieval function. Now let's share the function of using the CI framework and PHPmailer to send a QQ mailbox to retrieve the password.
Start extension = php_openssl.dll extension = php_sockets.dll of php. ini;
Then enable the smtp function for smtp Server Authentication mailbox. You can also use QQ mailbox for t
Yii2 mail configuration tutorial, reported Expected response code 250 but got code "553" reason, yii2expected
The mail configuration in main. php (or main-local.php) is as follows:
'Mailer' => ['class' => 'yii \ swiftmailer \ mailer ', 'viewpath' =>' @ common/mail ', // send all mails to a file by default. you have to set // 'usefiletransport 'to false and configure a transport // for the
Yii2.0 comes with email, yii2.0email
Most frameworks have built-in email sending classes, and yii emails are also very simple. The Code is as follows:
1. modify the configuration file. The common version is in (config/web. php ). Pro default configuration in/common/config/main-local.php 2 3 'components' => ['Mailer' => [4 'class' => 'yii \ swiftmailer \ mailer ', 5 'usefiletransport' => false, // you must c
have configured the local mail server (SendMail or postfix), and the correct delivery to the user's mailbox.MailFrom, as the name implies, specifies the sender. The e-mail address can be a complete recipient address, or it can be a local user on the server, such as root (some mail servers do not support displaying sender aliases).Specify the client that sent the messagemailer = "sendmail -t"The default is SendMail (not the SendMail server), and is generally fine. In my environment a little spec
that creates operator.
# Cm user. operator
In the cyradm management command line status, you can use the following command to create other folders, such as the sender, garbage bin, and draft box, for the user lbt in its mail box.
Createmailbox user. lbt. Send
Createmailbox user. lbt. Trash
Createmailbox user. lbt. Drafts
After user. lbt is created, you can use the deletemailbox command to delete the mailbox. Even the Administrator cyrus has no Permission (Permission denied ). To delete it,
. Generally, the mail header is not added when the customer receives the mail. Next we will take a closer look at how these mail headers are generated.
When lisi's email client program edits the email and sends it to mail.zky.ac.cn, the Mail content is as follows. These contents are added by the mail Editor (outlook express:
From: lisi@zky.ac.cn (Li Si)To: zhangsan@263.netDate: Tue, Mar 18 1997 14:36:14 PSTX-Mailer: Outlook Express 5.5Subject: Lunch?
AUTH LOGIN
Identity verification is imminent
MAIL from
Tell the other person who this email was sent to
RCPT to
Send to WHO
DATA
Tell the other person this email, and then we send the email details
QUIT
After the message content has been entered, execute the command to exit
PHP for mail delivery
Directly on the code
Class mailer{private $host; Private $port = 25
In socket + pop3 to automatically import emails from 163 mailboxes to the database 2, we have obtained emails from 163 mailboxes locally, and printed on the screen in "socket + pop3 to automatically store mails with 163 mailboxes 2", we have taken mails with 163 mailboxes to the local device and printed them on the screen.
We analyzed one of them and found that the strings printed on the screen were garbled. at this time, let's look at its source code and we will find the following: sorted ed: f
Solve Yii2 email sending problem (the result returned successfully but failed to receive the email), yii2 email sent
I used the yii mail sending function just now. Although the result is returned successfully, I cannot receive the email. The configuration file code is as follows:
'components' => [ 'db' => [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=localhost;dbname=yiidemo', 'username' => 'root', 'password' => 'root', 'charset' => 'utf8', ],
Yii2 emails are sent to yii2 if the returned result is successful but the email cannot be received.
Preface
This article describes how to solve Yii2's problem of sending a successful email but failing to receive the email. For your reference, let's take a look at the details below:
I used the yii mail sending function just now. Although the result is returned successfully, I cannot receive the email.
The configuration file code is as follows:
'components' => [ 'db' => [ 'class' => 'yii\db\Conne
DATA
Tell the recipient about this email. Next we will send the specific content of the email.
QUIT
After the email content is entered, execute this command to exit
Php implements email sending
Directly Add code
Class Mailer {private $ host; private $ port = 25; private $ user; private $ pass; private $ debug = false; private $ sock; public function _ construct ($ host, $ port, $ user, $ pass, $ debug = false)
authentication$mail->username = "[email protected]";//Sender's 163 mailbox user name$mail->password = "******";//Sender's mailbox password, note with 163 mailbox here is filled out is "client authorization password" instead of the mailbox login password! $mail->smtpsecure = "SSL";//using the SSL protocol method$mail->port = 994;//163 The SSL protocol port number for the mailbox is 465/994$mail->setfrom ("[Email protected]", "Mailer");//set sender inf
Recently done a mailbox verification function, studied for a while, took care of the automatic sending of mail. The following with QQ mailbox as a demonstration, step by step to explain:CodeFirst of all, is to do mail delivery, the code is as follows:[HTML]View PlainCopy
PHP
Send mail
Require './mailer/class.phpmailer.php ';
Require './mailer/class.smtp.php ';
Date_default_timezone_set (' PRC ')
address can be a full recipient address, or it can be a local user on the server such as root (some mail servers do not support displaying the sender alias).
Specify the client that sends the message
Mailer = "Sendmail-t"The default is SendMail (not a sendmail server), and generally there is nothing wrong with it. In my environment a little bit special, the mail server must pass the SMTP authentication to send mail, does not support anonymous and o
surpass. Or, the word "anti" is a challenge to the highest authority.There are also some interesting things about mandala, which are generally found in mizong. I think it is quite straightforward to use as game materials. For example, there are two types of Mandala In the BCC: the fetal Tibetan community and the diamond community. The middle class honors the great sun, and the fetal Tibetan table is "rational", while the diamond table is "wise ". Er, but these have nothing to do with xuanyuan.
trap Layer 3 to continue the investigation. After finding the key of damm (Northeast side) and the healing medicine, I opened the south gate and a bat monster appeared, as countless little bats suddenly attacked me! I quickly Dodge and lead it to the top. When it recovers from being a big bat, I will seize the opportunity to attack it! After repeated attempts, I finally beat it and got the book of essu, the "Da bi chapter".
Chapter 5 eshu
Now I have found three books of ISU, and the history 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.