Mail () sendmail QQ Mail
Development environment with the WAMP, download and install the SendMail program, according to the online statement also changed the php.ini and Sendmail.ini
Use Foxmail 7.1 to create their own QQ mailbox account, opened the POP3/SMTP service. Change the outgoing sender server to POP3, using the same authentication as the receiving server. The result is an error: Warning:mail (): SMTP server response:503 error:need EHLO and AUTH first! In F:\PHP\wamp\www\mail.php on line 8
Do not know which place is wrong, ask the person of the meeting to instruct. Thank you!!!
Reply to discussion (solution)
Can try Phpmailer
$path = Realpath (dirname (__file__)). ' /.. /libraries/mail.php '; include ("$path");; $mail = new mail (); Creation of new objects $mail->issmtp (); $mail->smtpauth = True to send mail using SMTP; What does SMTP need?? $mail->smtpsecure = "SSL"; Gmail's SMTP master needs SSL?? $mail->host = "smtp.gmail.com"; Gamil SMTP host? $mail->port = 465; SMTP port of the Gamil SMTP main? 465 ports. $mail->charset = "UTF-8"; ? $mail->username = "onlyfortestlzz@gmail.com"; ? fixed???? $mail->password = "ABCDE"; ??? Dense? $mail->from = "onlyfortestlzz@gmail.com"; ? mail $mail->fromname = "Working person?" The name of the sender $mail->subject = "Phpmailer??" Letter "; ? $mail->body = "Hello"; $mail->ishtml (TRUE); How to make a definite case? HTML $mail->addaddress ($this->input->post (' Backemail '), $value->username); What is the name of the recipient? if (! $mail->send ()) {echo ' OK '; }
It is recommended to use pear, install the following three:
(1), Mail
(2), NET_SMTP
(3), Mail_mime
The mail () function did not succeed because there was no
$mail->host = "smtp.gmail.com"; Gamil SMTP host?
That is, it is not sent from an account.
The message sent by this function is considered by the receiving server to be junk mail thrown away. Note that spam in the mailbox is not very junk. And it's just thrown away.
PHP uses Phpmailer, and a few use pear.
The Mail function can only use its own configured SMTP server that does not require user authentication
If your SMTP is not recognized by the E-Mail alliance, messages sent will be processed as spam
Can try Phpmailer
$path = Realpath (dirname (__file__)). ' /.. /libraries/mail.php '; include ("$path");; $mail = new mail (); Creation of new objects $mail->issmtp (); $mail->smtpauth = True to send mail using SMTP; What does SMTP need?? $mail->smtpsecure = "SSL"; Gmail's SMTP master needs SSL?? $mail->host = "smtp.gmail.com"; Gamil SMTP host? $mail->port = 465; SMTP port of the Gamil SMTP main? 465 ports. $mail->charset = "UTF-8"; ? $mail->username = "onlyfortestlzz@gmail.com"; ? fixed???? $mail->password = "ABCDE"; ??? Dense? $mail->from = "onlyfortestlzz@gmail.com"; ? mail $mail->fromname = "Working person?" The name of the sender $mail->subject = "Phpmailer??" Letter "; ? $mail->body = "Hello"; $mail->ishtml (TRUE); How to make a definite case? HTML $mail->addaddress ($this->input->post (' Backemail '), $value->username); What is the name of the recipient? if (! $mail->send ()) {echo ' OK '; }
Thank you. The use of Phpmailer has been resolved.