我们利用 phpmailer功能实现邮件发送功能哦,这里还利用了模板呢,就是读取指定文件内容再发送给朋友.
- <?php
- @session_start();
- include(dirname(__FILE__).'./inc/function.php');
- require(dirname(__FILE__)."/mail/class.phpmailer.php");
- $array = array_unique(Get_value('mail',1));
- $type = Get_value('type',1);
- $mail = new PHPMailer();
- $count =0;
- $bad =0;
- $mail->IsSMTP(); // set mailer to use SMTP
- $mail->Host = "smtp.163.com"; // smtp1.example.com;smtp2.example.comspecify main and backup server
- $mail->SMTPAuth = true; // turn on SMTP authentication
- $mail->Username = "mailangel123"; // SMTP username
- $mail->Password = "******"; // SMTP password
- $mail->From = "mailangel123@163.com";
- $mail->FromName = "你的好友来信";
- $MailBody = GetContent($type);
- //$array =explode('|',$rs['mail']);
- foreach( $array as $tmpmail ){
- if( @preg_match("/w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/",$tmpmail)
- || strlen($User_Mail)<6 )
- {
- $mail->AddReplyTo("mailangel123@163.com", "44");
- $mail->AddAddress($tmpmail,'您好!');
- $mail->WordWrap = 50;
- $mail->CharSet="GB2312";
- //$mail->AddAttachment("/var/tmp/file.tar.gz");
- //$mail->AddAttachment("/tmp/image.jpg", "new.jpg");
- $mail->IsHTML(true);
- $mail->Subject = "你的朋友邀请你一起合影!";
- $mail->Body = $MailBody;
- if(!$mail->Send())
- {
- $bad++;
- $mail->ClearAddresses();
- $mail->ClearAttachments();
- }
- else
- {
- $count++;
- }
- }
- ShowMsg("result:$count");
- }
- 下面这个文章是读取html 文档并进行html发送哦,
- function GetContent($type){
- if( $type )
- {
- if(file_exists('./mail_room.html') )
- {
- $content = file_get_contents( './mail_room.html');
- }
- else
- {
- ShowMsg('file can' read fail ');
- }
- }
- else
- {
- if( file_exists( './mail_person.html') )
- {
- $content = file_get_contents( './mail_person.html');
- }
- else
- {
- ShowMsg('person file read fail!');
- }
- }
- return $content;
- }
- /* echo "<script>alert('发关".$count."邮件成功');</script>"; */
- ?>
波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
波比源码 » 利用phpmailer 发送邮件代码[发送html内容]
波比源码 » 利用phpmailer 发送邮件代码[发送html内容]
order levaquin 500mg generic levaquin 250mg without prescription
order aldactone sale order spironolactone 100mg pill generic fluconazole 100mg
sildenafil 100mg cost careprost pills order methocarbamol sale
purchase sildenafil sale aurogra 100mg tablet estradiol oral
buy lamotrigine 50mg without prescription mebendazole medication order tretinoin cream generic
order tadalis 20mg generic buy voltaren pill cost voltaren 100mg
indomethacin online order generic lamisil 250mg purchase trimox online
order cialis 5mg pill Best prices on viagra purchase viagra without prescription
acheter 10mg cialis en ligne acheter sildenafil en ligne viagra 25mg generique pas cher
buy prednisone 5mg buy 5mg cialis buy generic sildenafil 100mg
cialis ohne rezept sildenafil 100mg bestellen sildenafil generika rezeptfrei kaufen
buy provigil sale order diamox generic diamox 250mg cost
doxycycline 100mg pills clomid drug furosemide canada
altace 5mg brand avapro 300mg sale order azelastine sprayer
fosamax 70mg tablet buy motrin 600mg order pepcid generic
purchase isosorbide generic buy generic imdur 40mg micardis 20mg canada
order bupropion 150mg for sale zyban for sale online buy quetiapine 100mg online cheap
imuran 100mcg price pantoprazole 20mg canada cost sildenafil 100mg
tadalafil 10mg for sale Discount cialis online sildenafil 100mg england
cialis 10mg buy cialis 20mg online cheap amantadine over the counter
revia online buy buy letrozole 2.5mg online cheap buy aripiprazole 30mg online cheap
order avlosulfon 100 mg for sale cheap perindopril 8mg perindopril 8mg pills
order provera without prescription periactin 4mg ca periactin for sale online
azithromycin 250mg tablet cost prednisolone 5mg order generic neurontin 800mg
cialis 10mg generic generic sildenafil 50mg brand viagra 50mg
chloroquine 250mg us order chloroquine 250mg online cheap baricitinib 4mg canada
buy glycomet 500mg pill order tadalafil 20mg online cheap cialis 40mg over the counter
amlodipine buy online tadalafil 20mg price cialis 40mg over the counter
order clozapine 50mg for sale cheap dexamethasone decadron drug
buy sildenafil without prescription sildenafil 50mg without prescription lisinopril cheap
orlistat brand order diltiazem 180mg generic zovirax 800mg cost
tadalafil 10mg price buy cialis 40mg generic clopidogrel 150mg uk
allopurinol 300mg canada zyloprim 300mg brand purchase zetia sale
cost domperidone 10mg buy domperidone without prescription buy flexeril 15mg online
tamsulosin 0.2mg over the counter tamsulosin 0.2mg canada aldactone 100mg cheap
cialis 40mg oral ampicillin usa order generic cipro
cheap fluconazole fluconazole 200mg tablet sildenafil 200mg price
order generic sildenafil 50mg cialis 5 mg buy cialis for sale
buy ceftin 500mg sale robaxin for sale online buy methocarbamol 500mg sale
blackjack free online real money poker online modafinil buy online
lasix 40mg pill lasix generic buy plaquenil 200mg generic
naprosyn order online cefdinir medication order prevacid 15mg without prescription
buy albuterol 100mcg for sale proventil 100mcg cost cipro 500mg ca
cost actos 15mg buy viagra 100mg pills cheap sildenafil for sale
tadalafil for women casino online usa play poker online real money
best casino online free spins casino real online blackjack
real money casino online usa casino free spin online blackjack spins website
slot games online free online assignment help write research papers
buy altace 5mg online cheap buy etoricoxib pill etoricoxib 120mg oral
purchase diamox online buy imuran 50mg pills azathioprine 25mg usa
buy amoxil 1000mg generic amoxil 500mg sale ivermectin 0.1 uk
buy dapoxetine generic avana uk buy motilium 10mg generic
order pamelor 25mg pill panadol order online order paroxetine pill
pepcid 20mg uk purchase famotidine sale purchase mirtazapine pills
After all, what a great site and informative posts, I will upload inbound link – bookmark this web site? Regards, Reader. Metropol Halı Karaca Halı Öztekin ve Selçuklu Halı Cami Halısı ve Cami Halıları Türkiye’nin En Büyük Cami Halısı Fabrikasıyız…
buy fenofibrate 200mg pills viagra cheap order sildenafil 50mg sale
order minocycline 100mg online order neurontin 600mg generic purchase terazosin generic
order glycomet 1000mg online cheap generic tamoxifen 10mg buy generic nolvadex 10mg
order prednisone generic isotretinoin 40mg cost buy amoxicillin 500mg without prescription
buy ed pill buy sildenafil 100mg pills order finasteride 1mg sale
order ondansetron 4mg generic zofran price cost trimethoprim
accutane pill cheap generic amoxicillin generic azithromycin 250mg