Original: Www.111cn.net
NOTE: Reprint instructions to place www.111cn.net
//
Yesterday to listen to a netizen said that the mail in PHP email sent out, I think the general is not hair, and now most of the mail providers are not allowed to do so.
Here we go with Phpmailer,
First to tom.com to register a mailbox bar.
function Smtp_mail ($accept _email, $accept _name, $accept _info) {
$mail = new Phpmailer ();
$mail->issmtp (); Send via SMTP
$mail->host = "smtp.tom.com"; SMTP servers
$mail->smtpauth = true; Turn on SMTP authentication
$mail->username = "Cs_he"; SMTP username Note: Normal mail authentication does not require @ domain name
$mail->password = "123456"; SMTP Password
$mail->from = "cs_he@tom.com"; Sender's mailbox
$mail->fromname = "Please check your signature"; Sender
$mail->charset = "GB2312"; This specifies the character set!
$mail->encoding = "base64";
$mail->addaddress ("$accept _email", "$accept _name"); Recipient mailboxes and Names
$mail->addreplyto ("cs_he@tom.com", "tom.com");
$mail->ishtml (TRUE); Send As HTML
$mail->subject = ' Hello, please check your signature '; Message subject
Message content
$mail->body = "$accept _info";
$mail->altbody = "text/html";
$mail->send ();
}
It's easy on the top.