<!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">&nbsp;</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" />
          &nbsp;&nbsp;
          邮箱地址:
          <input type="text" size="22" />        </td>
      </tr>
      <tr>
        <td height="28">好友姓名:
          <input type="text" size="22" />
          &nbsp;&nbsp;
          邮箱地址:
          <input type="text" size="22" />        </td>
      </tr>
      <tr>
        <td height="28">好友姓名:
          <input type="text" size="22" />
          &nbsp;&nbsp;
          邮箱地址:
          <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发送邮件处理功能页面去除重复的邮箱地址的更多相关文章

  1. Java 爬虫(获取指定页面中所有的邮箱地址)

    import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.io.In ...

  2. 实例详细说明linux下去除重复行命令uniq

    地址:http://blog.51yip.com/shell/1022.html 一,uniq干什么用的 文本中的重复行,基本上不是我们所要的,所以就要去除掉.linux下有其他命令可以去除重复行,但 ...

  3. DataTable中如何去除重复的项【转】

    上周在项目中遇到一个问题,就是获取DataTable中某一列的值,因为从数据库中检索数据时,按照2个字段进行分组,而要获得的那一列刚好在分组这两列中,所以该列的值必然有重复,于是就想到了去除重复,有了 ...

  4. SQL 去除重复、获取最新记录

    应用中常会有需要去除重复的记录,或者获取某些最新记录(如:每个用户可以答题多次,每次答题时间不同,现在要获取所有用户的最新答题记录,即每个用户取最新的一条) 使用group 和max 即可实现上述功能 ...

  5. uniq linux下去除重复行命令

    一,uniq干什么用的 文本中的重复行,基本上不是我们所要的,所以就要去除掉.linux下有其他命令可以去除重复行,但是我觉得uniq还是比较方便的一个.使用uniq的时候要注意以下二点 1,对文本操 ...

  6. 在java程序中实现发送邮件的功能

    最近比较忙,在做一个人事管理系统的项目,在这项目需求中,需要一个发送邮件的功能.这个时候我们可以使用javamail的jar包来实现完美需要的功能,在这里简单的分享一个最基础的发邮件功能. 首先我们需 ...

  7. .Net拾忆:从List去除重复-拾忆集合

    方法1: private static List<int> DistinctList(List<int> list) {//去除重复 HashSet<int> ha ...

  8. Java实现数组去除重复数据的方法详解

    一.用List集合实现 int[] str = {5, 6, 6, 6, 8, 8, 7,4}; List<Integer> list = new ArrayList<Integer ...

  9. txt文本怎么去除重复项

    txt文本怎么去除重复项?做网络推广的朋友经常会遇到这样的问题,txt文本文件里面有许多人名或者电话号码用来发送邮件或者短信,通常有许多是重复的,下面我来介绍两个方法来去除重复项,以人名为范本讲解. ...

随机推荐

  1. linux安装配置SVN并设置钩子

    安装说明 系统环境:CentOS-6.3安装方式:yum install (源码安装容易产生版本兼容的问题)安装软件:系统自动下载SVN软件 检查已安装版本 #检查是否安装了低版本的SVN 1 rpm ...

  2. Css3 提示框

    <div class="arrow_box"><span>xxy is a so cool boy</span></div> css ...

  3. Uva 129 Krypton Factor

    0.这道题的输出 处理起来挺麻烦的 以后类似的可以借鉴一下 ;i<cur;i++) { && i%==) printf("\n%c",a[i]); & ...

  4. BZOJ 1901 Zju2112 Dynamic Rankings ——整体二分

    [题目分析] 上次用树状数组套主席树做的,这次用整体二分去水. 把所有的查询的结果一起进行二分,思路很好. [代码] #include <cstdio> #include <cstr ...

  5. Shell 编程基础之基本语法结构汇总

    一.条件语句 简单条件 if [ condition ]; then # 当 condition 成立时,执行内容: fi # 将 if 反过来写,fi 结束 if 之意 复杂条件 if [ cond ...

  6. iOS学习16之OC集合遍历和数组排序

    1.集合遍历 1> 遍历 集合(Collection):OC中提供的容器类:数组,字典,集合. 遍历:对集合中元素依次取出的过称叫做遍历. 三种方式:① for循环遍历: ② NSEnumera ...

  7. VR教育旋风来袭,各大公司争先进军虚拟现实教育

    根据国内一份最新的报告显示,VR技术对于提高学生的学习成绩有非常积极的作用,并且通过测试结果来看,无论是对知识的认知还是成绩测试,VR都起到了非常有效的效果. 2016成为VR元年,虚拟现实技术除了在 ...

  8. ES5中新增的Array方法详细说明

    一.前言-索引 ES5中新增的不少东西,了解之对我们写JavaScript会有不少帮助,比如数组这块,我们可能就不需要去有板有眼地for循环了. ES5中新增了写数组方法,如下: forEach (j ...

  9. js 过滤敏感词

    <html> <head>     <title>Bad Words Example</title>     <script type=" ...

  10. ACM spiral grid

    spiral grid 时间限制:2000 ms  |  内存限制:65535 KB 难度:4   描述 Xiaod has recently discovered the grid named &q ...