php发送邮件处理功能页面去除重复的邮箱地址
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>--邀请好友参加</title>
<style type="text/css">
<!--
body {
margin: 0px;
padding: 0px;
font-size: 12px;
}
input {
line-height: 18px;
height: 18px;
border: 1px solid #CCCCCC;
}
img {
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
}
* {
margin: 0px;
padding: 0px;
list-style-image: none;
list-style-type: none;
background-repeat: no-repeat;
}
td {
line-height: 22px;
font-size: 14px;
font-weight: 700;
color: #276662;
}
-->
</style>
</head>
<body>
<form action="#" method="post" name="form">
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="572" height="227" valign="top" background="img/mailfooterimg.gif"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="70"> </td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="text" value="http://111cn.cn/" size="60" /></td>
<td height="40"><a href="#"><img src="img/copy.gif" width="72" height="22" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="28">好友姓名:
<input type="text" size="22" />
邮箱地址:
<input type="text" size="22" /> </td>
</tr>
<tr>
<td height="28">好友姓名:
<input type="text" size="22" />
邮箱地址:
<input type="text" size="22" /> </td>
</tr>
<tr>
<td height="28">好友姓名:
<input type="text" size="22" />
邮箱地址:
<input type="text" size="22" /> </td>
</tr>
<tr>
<td height="28" align="right"><a href="#"><img src="img/sendbtn.gif" width="95" height="26" /></a></td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
发送邮件处理功能页面。
mail.php
<?
require(dirname(__FILE__)."/mail/class.phpmailer.php"); //调用 phpmailer类型,如果没有phpmailer请点击这里下载phpmailer for php5/6 下载
$array = array_unique(Get_value('mail',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 = "mailangel1232881064151"; // SMTP username
$mail->Password = "*******"; // SMTP password
$mail->From = "mailangel123@163.com";
$mail->FromName = "你的好友来信";
$MailBody = '内容'
$mail->AddReplyTo("mailangel123@163.com", "澳优");
$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();
}
OK就完成了哦。
?>
php发送邮件处理功能页面去除重复的邮箱地址的更多相关文章
- Java 爬虫(获取指定页面中所有的邮箱地址)
import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.io.In ...
- 实例详细说明linux下去除重复行命令uniq
地址:http://blog.51yip.com/shell/1022.html 一,uniq干什么用的 文本中的重复行,基本上不是我们所要的,所以就要去除掉.linux下有其他命令可以去除重复行,但 ...
- DataTable中如何去除重复的项【转】
上周在项目中遇到一个问题,就是获取DataTable中某一列的值,因为从数据库中检索数据时,按照2个字段进行分组,而要获得的那一列刚好在分组这两列中,所以该列的值必然有重复,于是就想到了去除重复,有了 ...
- SQL 去除重复、获取最新记录
应用中常会有需要去除重复的记录,或者获取某些最新记录(如:每个用户可以答题多次,每次答题时间不同,现在要获取所有用户的最新答题记录,即每个用户取最新的一条) 使用group 和max 即可实现上述功能 ...
- uniq linux下去除重复行命令
一,uniq干什么用的 文本中的重复行,基本上不是我们所要的,所以就要去除掉.linux下有其他命令可以去除重复行,但是我觉得uniq还是比较方便的一个.使用uniq的时候要注意以下二点 1,对文本操 ...
- 在java程序中实现发送邮件的功能
最近比较忙,在做一个人事管理系统的项目,在这项目需求中,需要一个发送邮件的功能.这个时候我们可以使用javamail的jar包来实现完美需要的功能,在这里简单的分享一个最基础的发邮件功能. 首先我们需 ...
- .Net拾忆:从List去除重复-拾忆集合
方法1: private static List<int> DistinctList(List<int> list) {//去除重复 HashSet<int> ha ...
- Java实现数组去除重复数据的方法详解
一.用List集合实现 int[] str = {5, 6, 6, 6, 8, 8, 7,4}; List<Integer> list = new ArrayList<Integer ...
- txt文本怎么去除重复项
txt文本怎么去除重复项?做网络推广的朋友经常会遇到这样的问题,txt文本文件里面有许多人名或者电话号码用来发送邮件或者短信,通常有许多是重复的,下面我来介绍两个方法来去除重复项,以人名为范本讲解. ...
随机推荐
- loadrunner实现字符串的替换
char *replace_str(char *str, char *orig, char *rep) { static char buffer[9096]; char *p; i ...
- 记一次小团队Git实践(中)
对于初学者,从使用上先入手,往往学的最快,并从中汲取教训,再回头更深入的学习,效果尤佳. 安装git 安装git自不必说,mac已经内置了git,linux下一个命令就能搞定,windows下需要下载 ...
- mac下mysql的安装
由于最近需要布置mantis用来进行bug追踪,在此记录其过程. 由于PHP apache环境在Mac OS上是自带的,所以不需要另处下安装包,只需要简单配置一下即可. 首先打开终端输入命令: sud ...
- 5.15[没什么营养的一段日子]A*
五月份没有写过blog. 期中考刚过......漫漫文化课,无尽头. 马上要为联赛开坑了,激动啊. 刚听了孙柘的演讲..%%% 最近刷的题只有一道启发式合并,一道分层图,一道差分约束..然后不知不觉破 ...
- Android App 性能优化实践
本文记录了Android App优化需要用到的工具和以及在实践中的Tips.也算对我这半年来部分工作的总结. 工具 Hierarchy Viewer 是 Android SDK 自带的 Layout ...
- Glow Android 优化实践
了解 Glow 的朋友应该知道,我们主营四款 App,分别是Eve.Glow.Nuture和Baby.作为创业公司,我们的四款 App 都处于高速开发中,平均每个 Android App 由两人负责开 ...
- Redis开启持久化
配置appendonly 打开redis.conf找到appendonly. 将 appendonly no 改为 appendonly yes 配置appendfsync appendfsync a ...
- Django的cookie和session
http://www.cnblogs.com/lhj588/archive/2011/10/27/2226976.html
- Diophantus of Alexandria[HDU1299]
Diophantus of Alexandria Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Ot ...
- php 从myslql里导出到excel
//导出excel 只wps可以打开public function takexcelAction(){ $name = $this->input->get_post('name'); $i ...