Recently, there are always students in our php Chinese website QQ group 5 asking how to use the php mail class. Today I will give you some instructions on how to use the mail class.
This article uses the following class library as an explanation of "Powerful PHP Email Sending Class" Click on the title to go to the class library. If you need to view morephp class libraries, you can click the link below: //m.sbmmt.com/xiazai/leiku
你的用户名是张三,密码是123147mcl "; //邮件内容 $mailtype = "HTML"; //邮件格式(HTML/TXT),TXT为文本邮件 $smtp = new smtp($smtpserver,$smtpserverport,true,$smtpuser,$smtppass); $smtp->debug = true; //是否显示发送的调试信息 $smtp->sendmail($smtpemailto, $smtpusermail, $mailsubject, $mailbody, $mailtype); ?>
Directly instantiate this email class and configure it according to thecommentcontent to achieve mass sending of emails.
Note: Since we are using a third-party mail system (such as QQ mailbox), we need to configure the mailbox to a certain extent. The details are as follows:
What are the POP3 and SMTP servers of QQ mailbox?
QQ mailbox POP3 and SMTP server address settings are as follows:
Mailbox | POP3 server ( Port 995) | SMTP server (port 465 or 587) |
---|---|---|
qq.com | pop.qq.com | smtp .qq.com |
SMTP server requires authentication.
security of your account, changing the QQ password and independent password will trigger the authorization code to expire, and you need to obtain a new authorization code to log in.
2. How to obtain the authorization code? First go to Settings -> Account page to find the entrance, and follow the following process. (1) Click "Open"## Modify as shown above Once done.
php implements a class for sending emails Socket in php sends email verification email class php sends email class PHP email STMP simple class Mail sending php class php-socket sending mail class php-Mailer mail class Complete email sending class for php