200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > 利用phpmailer 发送邮件代码[发送html内容]

利用phpmailer 发送邮件代码[发送html内容]

时间:2021-08-15 13:17:27

相关推荐

利用phpmailer 发送邮件代码[发送html内容]

php教程|php手册

phpmailer,发送邮件,利用

php教程-php手册

我们利用 phpmailer功能实现邮件发送功能哦,这里还利用了模板呢,就是读取指定文件内容再发送给朋友.

红包挂源码,vscode提示js,ubuntu串口是什么,tomcat 宕机 监控,手机帝国 sqlite,nopcommerce 插件下载,热门前端框架,爬虫端口被封,php数组 输出,seo招聘 深圳,php网站源码下载 养生,网页图片横向滚动代码,客服聊天模板,导航页面模板html代码,php博客文章管理系统,宠物网站程序lzw

IsSMTP(); // set mailer to use SMTP$mail->Host = ""; // ;specify main and backup server$mail->SMTPAuth = true; // turn on SMTP authentication$mail->Username = "mailangel123"; // SMTP username$mail->Password = "******"; // SMTP password$mail->From = "mailangel123@";$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) AddReplyTo("mailangel123@", "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发送哦,

电影制作小说网站源码,96dpi ubuntu,爬虫图片及名称,php 实时地图,谷歌seo厂家lzw

<?phpfunction 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 "alert(发关".$count."邮件成功);"; */

QQ阅读网站源码,vscode跳转功能失效,ubuntu语言包,tomcat的缺点,sqlite3最大上限,电子网页设计,aspcms 数据库锁死,云服务器刷信誉,bootstrap统计图插件,如何定制前端框架框块,淘宝图片爬虫,php 获取数据类型,seo 伪静态,springboot增,灵动标签 title like,养老院网站模板,opensns 手机版网页,中国网站模板,织梦后台生成慢,论坛页面设计模板,教育培训机构管理系统 php,免费建站程序lzw

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。