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文本文件里面有许多人名或者电话号码用来发送邮件或者短信,通常有许多是重复的,下面我来介绍两个方法来去除重复项,以人名为范本讲解. ...
随机推荐
- torch7安装
按照官网进行安装即可;(http://torch.ch/docs/getting-started.html#_) # in a terminal, run the commands WITHOUT s ...
- AngularJs优缺点
1.优点:mvc.模块化.指令系统.双向数据绑定. 2.缺点:异步支持不好,放弃IE8.
- appium运行报错.<init>(Lorg/openqa/selenium/remote/ErrorCodes;Z)V
最近这几天就在学习appium,搭建环境就耗费了很多时间,不得不承认自己够笨的了,然后我把环境搭建好,写完脚本的时候,就报这个错了,当时是从某个群里直接下载的demo,不得不吐槽说,够坑的,是能跑通, ...
- 下载安全程序需谨慎 黑客盯上XP用户
中关村在线消息:微软在上周正式结束了对Windows XP的技术支持,而很多仍在使用Windows XP的用户会选择在网上自行下载第三方的安全工具.不过国外的安全机构Malwarebytes近日提醒, ...
- git 学习笔记1--config & help
1. config 配置用户名和邮箱: git config --global user.name 'pzdn2009' git config --global user.email 10502441 ...
- POJ1637 Sightseeing tour(判定混合图欧拉回路)
有向连通图存在欧拉回路的充要条件是所有点入度=出度. 首先随便给定所有无向边一个方向(不妨直接是u->v方向),记录所有点的度(记:度=入度-出度). 这时如果有点的度不等于0,那么就不存在欧拉 ...
- MySQL设置当前时间为默认值的方法
方法一.是用alert table语句: 复制代码代码如下: use test_db1; create table test_ta1( id mediumint(8) unsigned not nul ...
- ACM 懒省事的小明
懒省事的小明 时间限制:3000 ms | 内存限制:65535 KB 难度:3 描述 小明很想吃果子,正好果园果子熟了.在果园里,小明已经将所有的果子打了下来,而且按果子的不同种 ...
- ACM A problem is easy
A problem is easy 时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述 When Teddy was a child , he was always th ...
- 【转】C#进阶系列——WebApi 接口参数不再困惑:传参详解
原文地址:http://www.cnblogs.com/landeanfen/archive/2016/04/06/5337072.html 阅读目录 一.get请求 1.基础类型参数 2.实体作为参 ...