For small enterprises, free enterprise mail is a good choice, saving the cost of servers and personnel maintenance. Here we will talk about qq's free enterprise mailbox.
For small enterprises, free enterprise mail is a good choice, saving the cost of servers and personnel maintenance. Here we will talk about qq's free enterprise mailbox.
1. register an account
Web: http://exmail.qq.com
To register an account, you must have your own domain name.
2. add members
Note that the password you set when adding members cannot be used to send emails using phpmailer. You can use phpmailer to send emails only after you have logged on to this member and reset the password.
3. add dns
51yip.com. in mx 5 mxbiz1.qq.com.
51yip.com. in mx 10 mxbiz2.qq.com.
If you do not have your own DNS server, you can add two mx records. simply leave the host domain name empty. Take dnspod as an example.
4. test the PHP script
Include "PHPMailer/class. phpmailer. php ";
Function send_mail ($ frommail, $ tomail, $ subject, $ body, $ ccmail, $ bccmail ){
$ Mail = new PHPMailer ();
$ Mail-> IsSMTP ();
$ Mail-> SMTPDebug;
$ Mail-> Host = "smtp.qq.com ";
$ Mail-> SMTPAuth = true;
$ Mail-> Port = 25;
$ Mail-> Username = "admin@51yip.com ";
$ Mail-> Password = "******";
$ Mail-> AddReplyTo ($ frommail, 'tankzhang ');
$ Mail-> AddAddress ($ tomail );
$ Mail-> SetFrom ($ frommail, 'tankzhang ');
$ Mail-> IsHTML (true );
$ Mail-> Subject = $ subject;
$ Mail-> MsgHTML ($ body );
If (! $ Mail-> Send ())
{
Echo "failed to send the email.
";
Echo "error cause:". $ mail-> ErrorInfo;
Exit;
} Else {
Echo "success ";
}
}
$ Result = send_mail ("admin@51yip.com", "95219454@qq.com", "test", "test ","","");
?>
For small enterprises, free enterprise mail is a good choice, saving the cost of servers and personnel maintenance. Here we will talk about qq's free enterprise mailbox.
1. register an account
Web: http://exmail.qq.com
To register an account, you must have your own domain name.
2. add members
Note that the password you set when adding members cannot be used to send emails using phpmailer. You can use phpmailer to send emails only after you have logged on to this member and reset the password.
3. add dns
51yip.com. in mx 5 mxbiz1.qq.com.
51yip.com. in mx 10 mxbiz2.qq.com.
If you do not have your own DNS server, you can add two mx records. simply leave the host domain name empty. Take dnspod as an example.
4. test the PHP script
Include "PHPMailer/class. phpmailer. php ";
Function send_mail ($ frommail, $ tomail, $ subject, $ body, $ ccmail, $ bccmail ){
$ Mail = new PHPMailer ();
$ Mail-> IsSMTP ();
$ Mail-> SMTPDebug;
$ Mail-> Host = "smtp.qq.com ";
$ Mail-> SMTPAuth = true;
$ Mail-> Port = 25;
$ Mail-> Username = "admin@51yip.com ";
$ Mail-> Password = "******";
$ Mail-> AddReplyTo ($ frommail, 'tankzhang ');
$ Mail-> AddAddress ($ tomail );
$ Mail-> SetFrom ($ frommail, 'tankzhang ');
$ Mail-> IsHTML (true );
$ Mail-> Subject = $ subject;
$ Mail-> MsgHTML ($ body );
If (! $ Mail-> Send ())
{
Echo "failed to send the email.
";
Echo "error cause:". $ mail-> ErrorInfo;
Exit;
} Else {
Echo "success ";
}
}
$ Result = send_mail ("admin@51yip.com", "95219454@qq.com", "test", "test ","","");
?>