Introduction: This is an extension of the speedphp rapid website development framework (I) detailed page of [Mail Extension]. It introduces the knowledge, skills, and experience related to PhP, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 342379 'rolling = 'no'>
Due to the needs of recent development projects, I have always wanted to search for a more practical and fast development framework. The speedphp framework was finally used for a search on the Internet. Most of the reasons for using this framework are that I am focusing on the domestic framework, because the domestic framework is relatively simple for our project developers to learn, this framework is also developed based on the smarty framework and supports many extensions.
Continue with the theme. Today, we mainly talk about the extended class of email sending. I mainly use the following methods:
Reference the extension class first.
Add the spemail extension class to the speedphp extension class folder... speedphp \ extensions.
You can download the extension class library here.
Step 2 add an extension configuration node to the configuration file
ViewCode
1 'spemail' => array (// ������������?
2 'debug' => false, // else �� else 」
3 'host _ name' => '2014. com', //?
4 'smtp _ host' => 'smtp .163.com ', // SMTP?
5 'smtp _ port' => '25', // SMTP protocol
6 'auth' => true, // call Nan.
7 'from' => 'lyyliyongyi @ 163.com ', // ��
8 'user' => 'lyyliyongyi?
9 'pass' => '20140901', // optional
10 'Log _ file' => '', //
11 'time _ out' => 30, // else ��
12 ),
Step 3: reference in the class
View code
1 $ sendemail = $ this-> spargs ("email ");
2 $ Pwd = "";
3 if (! Empty ($ sendemail ))
4 {
5 // peak traffic
6 $ condition = array ("user_name" => $ sendemail );
7 $ mail = spclass ('spemail ');
8 $ libvpnuser = spclass ('lib _ vpn_user ');
9 $ userpwd = $ libvpnuser-> Find ($ condition );
10 if ($ userpwd! = False)
11 {
12 $ Pwd = $ userpwd ["password"];
13 // Why?
14 $ mailsubject = "bjtz VPN overview"; // Huan Juan wedding
15 $ mailbody = "16 $ mailtype = "文� ��". $ PWD; // tttttml/TXT examples? What is TXT?
17 $ result = $ mail-> Sendmail ($ sendemail, $ mailsubject, $ mailbody, $ mailtype );
18 if ($ result! = False)
19 {
20
21 $ str_mess = "€ € ?;
22 $ gettag = "info ";
23}
24}
25 else
26 {
27 // Why?
28 $ str_mess = "文' ";
29 $ gettag = "error ";
30}
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/342379.html pageno: 6.