<!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. loadrunner中切割字符串

    下面函数的作用: http://blog.csdn.net/hgj125073/article/details/8447605 通过-与: 字符切割字符串,即-与:字符已经被\0 字符取代 char  ...

  2. CSS3鼠标悬停图片动画

    鼠标放到图片上后: demo地址:demo div: <div class="wai"> <a href="#"> <div cl ...

  3. C++11 std::chrono库详解

    所谓的详解只不过是参考www.cplusplus.com的说明整理了一下,因为没发现别人有详细讲解. chrono是一个time library, 源于boost,现在已经是C++标准.话说今年似乎又 ...

  4. virtualtree 的使用(Delphi)

    VirtualTreeview的强大,毋庸置疑,不过,你能给演示演示,也不错,就是刚下来,只有一个可执行程序,感觉像病毒. 最近比较忙,没有上网,现在把我研究的结果和大家通报下,方便新手学习,避免走弯 ...

  5. Android自动化测试 - MonkeyRunner(一)介绍

    MonkeyRunner介绍: MonkeyRunner是Google提供的一个基于坐标点的Android黑盒自动化测试工具. Monkeyrunner工具提供了一套API让用户/测试人员来调用,调用 ...

  6. 【Oracle】ORA-00257:archiver error. Connect internal only, until freed 错误的处理方法

    archive log 日志已满ORA-00257: archiver error. Connect internal only, until freed 错误的处理方法 1. 用sys用户登录  s ...

  7. BZOJ 1412 & 最小割

    什么时候ZJ省选再现一次这么良心的题吧... 题意: 在一个染色的格子画分割线,使其不想连,求最少的线段 SOL: 裸裸的最小割.题目要求两种颜色不想连,我们把他分到两个集合,也就是把所有相连的边切断 ...

  8. ACM: 强化训练-Beautiful People-最长递增子序列变形-DP

    199. Beautiful People time limit per test: 0.25 sec. memory limit per test: 65536 KB input: standard ...

  9. NOI模拟赛 Day1

    [考完试不想说话系列] 他们都会做呢QAQ 我毛线也不会呢QAQ 悲伤ING 考试问题: 1.感觉不是很清醒,有点困╯﹏╰ 2.为啥总不按照计划来!!! 3.脑洞在哪里 4.把模拟赛当作真正的比赛,紧 ...

  10. PHP面向对象学习四 类的关键字

    1.关键字:final 用来定义类和方法的一个重要关键字,当定义类的时候该类将不能被继承, 当用来定义方法的时候该方法将不能被重载 2.关键字:static 用来定义类的静态属性或方法,可以在类未被实 ...