Php method 2 (SMTP transfer SMTP class call ). [Html]? Phprequire_once (email2.php); Method 2 for sending php mail (SMTP transmission SMTP class) *** server information *** $ MailServersmtp.163.com; SMTP server $ MailPort25; SMT [html]
Require_once ("email2.php"); // This is php method 2 (SMTP transmission SMTP class)
/**
* Server information
*/
$ MailServer = 'smtp .163.com '; // smtp server
$ MailPort = '25'; // The default SMTP server port number is 25.
$ MailId = 'anheng123 @ 163.com '; // server email account
$ MailPw = 'xxxxxxxxxxxxxx'; // server email password
/**
* Client information
*/
$ Title = 'system developers report error information'; // mail Title
$ Bt = "sadfsadf ";
$ _ POST ['URL'] = "afasdfasfasfsaf ";
$ _ POST ['liance'] = "12312412 ";
$ _ POST ['xiangsi'] = "isa in the first sentence, and I feel like I am modifying it ";
$ Td = $ subject .'
'.' Title: '. $ bt .'
'. 'URL:'. $ _ POST ['URL'].'
'.' Contact number: '. $ _ POST ['liance'].'
'.' Details: '. $ _ POST ['xiangsi'];
$ Content = $ td; // email Content
$ Email = www.2cto.com target recipient email
$ Smtp = new smtp ($ MailServer, $ MailPort, true, $ MailId, $ MailPw );
$ Smtp-> debug = false;
If ($ smtp-> sendmail ($ email, $ MailId, $ Title, $ Content, "HTML ")){
Echo 'email sent successfully'; // return result
} Else {
Echo 'email sending failed'; // $ succeed = 0;
}
?>
Author: Vericlongmore
Why? Php require_once (email2.php); // method 2. (SMTP transmission SMTP class)/*** server information */$ MailServer = smtp.163.com; // SMTP server $ MailPort = 25; // SMT...