edit php mailer script

Đã Đóng Đã đăng vào Mar 29, 2010 Thanh toán khi bàn giao
Đã Đóng Thanh toán khi bàn giao

I have a php mailer script

I want to be able to set the delay between emails (right now it can be set by user)

I want to be able to have the script stop and restart randomly

I'd like to set a username and password

## Deliverables

<?

# **********

# ** (c) 2004. All rights reserved.

# ** You may change or alter this code so that it works on your server.

# ** You do not have rights to resell this script unless you purchased rights.

# **********

# ** This delay can be set to any

# ** whole number of seconds.

# **********

if (!$delaySecs) {

? ? $delaySecs = 20;

}

if (!$term) {

? ? $term = ',';

}

if (!$tot_emails) {

? ? $tot_emails = '0';

}

If ($action=="mysql"){

? #Grab email addresses from MySQL

? include "./[url removed, login to view]";

? if (!$sqlhost || !$sqllogin || !$sqlpass || !$sqldb || !$sqlquery){

? print "Please configure [url removed, login to view] with your MySQL information. All settings in this config file are required.";

? exit;

? }

? $db = mysql_connect($sqlhost, $sqllogin, $sqlpass) or die("Connection to MySQL Failed.");

? mysql_select_db($sqldb, $db) or die("Could not select database $sqldb");

? $result = mysql_query($sqlquery) or die("Query Failed: $sqlquery");

? $numrows = mysql_num_rows($result);

? for($x=0; $x<$numrows; $x++){

? $result_row = mysql_fetch_row($result);

? $oneemail = $result_row[0];

? $emaillist .= $oneemail."\n";

? }

}

if ($loadfile) {

? $emaillist='';

? If ($addressfile_name){

? ? //$content = fread(fopen($addressfile,"r"),filesize($addressfile));

? ? //$addresses = split("[[:space:]]+", trim($content));

? ? //$emaillist = join("\n", $addresses) . "\n";

? ?

? ? $lines = file2($addressfile);

? ?

? ? if ($titles_radiogroup == 1) {

? ? ? $checked1 = "checked";

? ? ? $checked2 = "";

? ? ? //extract the titles

? ? ? $titles = $lines[0];

? ? ? array_shift($lines);

? ? ? $emaillist = join("\n", $lines);

? ? ? $tot_emails = count($lines);?

? ? ? $tag_array = explode(',',$titles);

? ? ? foreach ($tag_array as $key => $value){?

? ? ? ? ? $thetags .= '<option value="%'.$value.'%">%'.$value.'%</option>'."\n";

? ? ? }? ? ?

? ? }else{

? ? ? $checked1 = "";

? ? ? $checked2 = "checked";

? ? ? $titles="";

? ? ? $emaillist = join("\n", $lines);

? ? ? $tot_emails = count($lines);

? ? ? $thetags = '<option value="%Email%">%Email%</option>'."\n";?

? ? }?

? ? $enc_check = "";

? ? ? ? if ($enc) {

? ? ? ? ? ? $enc_check = "checked";

? ? ? ? }

? }?

}

if ($submit){

? ? ? #Open the file attachment if any, and base64_encode it for email transport

? If ($file_name){

? ? @copy($file, "./$file_name") or die("The file you are trying to upload couldn't be copied to the server, make sure the folder where this script is located has it's permissions set correctly.");

? ? $content = fread(fopen($file,"r"),filesize($file));

? ? $content = chunk_split(base64_encode($content));

? ? $uid = strtoupper(md5(uniqid(time())));

? ? $name = basename($file);

? ? print '<input name="ffile" type="hidden" value="true">';

? }

? $message = urlencode($message);

? $message = ereg_replace("%5C%22", "%22", $message);

? $message = urldecode($message);

? $message = stripslashes($message);

? $subject = stripslashes($subject);?

? $emaillist = stripslashes($emaillist);

? $term = stripslashes($term);

? if ($max_emails > 0) {

? ? if ($submit == "Send Message") {

? ? ? ? $send_button = "Resume";? ? ?

? ? }else{

? ? ? ? $send_button = "Send Message";? ? ? ? ? ? ? ?

? ? }? ? ?

? }else{

? ? $send_button = "Send Message";

? }

? $enc_check = "";

? if ($enc) {

? ? $enc_check = "checked";

? }

? if ($titles_radiogroup == 1) {

? ? $checked1 = "checked";

? ? $checked2 = "";

? }else{

? ? $checked1 = "";

? ? $checked2 = "checked";

? }

? if ($titles) {?

? ? $tag_array = explode(',',$titles);

? ? ? ? ? foreach ($tag_array as $key => $value){?

? ? ? ? $thetags .= '<option value="%'.$value.'%">%'.$value.'%</option>'."\n";

? ? }

? }else{

? ? $thetags = '<option value="%Email%">%Email%</option>'."\n";

? }

}else{

? $send_button = "Send Message";

}

function file2($filename) {

? ? ? ? ? ? $fp = fopen($filename, "r");

? ? ? ? ? ? $buffer = fread($fp, filesize($filename));

? ? ? ? ? ? fclose($fp);

? ? ? ? ? ? $lines = preg_split("/\r?\n|\r/", trim($buffer));

? ? ? ? ? ? return $lines;

}

?>

<html>

<script language="JavaScript">

<!--

function clearAll(){

? var f1 = [url removed, login to view][0];

? f1.realname.value="";

? f1.from.value="";

? f1.replyto.value="";

? f1.file.value="";

? f1.subject.value="";

? f1.message.value="";?

}

function clearList(){

? var f1 = [url removed, login to view][0];

? f1.emaillist.value="";

? f1.titles.value="";

? f1.tot_emails.value="";

}

function checkvalue(){

? var f1 = [url removed, login to view][0];

? if ([url removed, login to view] != ""){

? ? ? mxe = parseFloat([url removed, login to view]);

? ? ? if (isNaN(mxe)){

? ? ? ? ? wm = "The maximum number of emails is an invalid entry.";

? ? ? ? ? alert(wm);

? ? return false;

? ? ? }else{

? ? ? ? ? return true;

? ? ? }

? }

}

function add_tag(){

? var f1 = [url removed, login to view][0];

? [url removed, login to view] = [url removed, login to view] + [url removed, login to view][[url removed, login to view]].value;

}

//-->

</script>

<form name="form1" method="post" action="" enctype="multipart/form-data" style="margin:0px" onsubmit="return (checkvalue())">

<table width="50%" border="0" cellspacing="0" cellpadding="3" align="center">

? <tr bgcolor="#0000FF">

? ? ? ? ? ? ? ? ? <td height="8" colspan="2" valign="top">

? ? ? ? ? ? ? ? ? ? ? <div align="center" class="style1"><font face="Verdana, Arial, Helvetica, sans-serif"><img src="<[url removed, login to view]>" width="85" height="100"></font></div></td>

? ? ? ? ? ? ? </tr>

? <tr>

? ? ? <td height="25" colspan="2" valign="top" bgcolor="#0000FF">

? ? ? ? ? <div align="center">

? ? <font color="#FFFF00" size="4" face="Verdana, Arial, Helvetica, sans-serif"><strong>Inboxing

? ? Mailer Program

? ? ? ? ? ? ? v3.0</strong></font></div>

? ? ? </td>

? </tr>

? <tr align="center">

? ? ? <td width="40%" height="575" valign="top">

? ? ? ? ? <table width="300" height="569" border="0" align="center" cellpadding="1" cellspacing="0">

? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? <td width="520" height="23" bgcolor="#0000FF"> <div align="center"><font color="#FFFF00" face="Verdana, Arial, Helvetica, sans-serif"><strong>Step

? ? ? ? ? ? ? ? ? ? ? ? ? 1: Load Your Mailing List</strong></font></div></td>

? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? <td height="546" valign="top" bgcolor="#0000FF">

? ? ? ? ? ? ? ? ? ? ? <table width="100%" height="522" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFFF00">

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td height="34" colspan="2"> <div align="center"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input type=file name=addressfile>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font></div></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="54%" height="32"> <div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Fields

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? terminated by:</font></div></td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="46%"><input name="term" type="text" id="term" value="<? print $term; ?>" size="10"></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td height="26" colspan="2"> <div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input name="enc" type="checkbox" value="checkbox" <?php print $enc_check; ?>>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Enclosed Fields</font><font size="2" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font></div></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td height="26" colspan="2"> <p align="left">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <label>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input name="titles_radiogroup" type="radio" value="1" <?php print $checked1; ?>>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <font size="2" face="Verdana, Arial, Helvetica, sans-serif">With

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Titles</font></label>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <br>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <label>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input type="radio" name="titles_radiogroup" value="0" <?php print $checked2; ?>>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <font size="2" face="Verdana, Arial, Helvetica, sans-serif">Without

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Titles</font></label>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <br>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </p></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td height="34" colspan="2"><div align="center"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input name="loadfile" type="submit" id="loadfile" value="Load Addresses From File">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font></div></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td height="32" colspan="2"> <div align="center"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font> <font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Titles:

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input name="titles" type="text" id="titles" value="<?php print $titles; ?>" size="30">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font></div></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td height="272" colspan="2" valign="top"> <div align="center"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <textarea name="emaillist" cols="30" rows="15" wrap="OFF"><? print $emaillist; ?></textarea>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font></div></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td height="32" valign="top"> <div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Total

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Emails:</font></div></td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td height="32" valign="top"> <input name="tot_emails" type="text" id="tot_emails" value="<?php print $tot_emails; ?>" size="10"></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td height="34" colspan="2" valign="top"> <div align="center"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input type="button" name="Button" value="Clear List" onClick="clearList()">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font></div></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? </table></td>

? ? ? ? ? ? ? </tr>

? ? ? ? ? </table></td>

? ? ? <td width="60%" valign="top">

? ? ? ? ? <table width="500" height="449" border="0" align="center" cellpadding="1" cellspacing="0">

? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? <td height="22" bgcolor="#0000FF"> <div align="center"><font color="#FFFF00" face="Verdana, Arial, Helvetica, sans-serif"><strong>Step

? ? ? ? ? ? ? ? ? ? ? ? ? 2: Deliver Your Emails</strong></font></div></td>

? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? <td height="427" valign="top" bgcolor="#0000FF">

? ? ? ? ? ? ? ? ? ? ? <table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFFF00">

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="20%">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <div align="right"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Your

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Name:</font></div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="80%"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input type="text" name="realname" value="<? print $realname; ?>" size="30">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <div align="right"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Your

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Email:</font></div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input type="text" name="from" value="<? print $from; ?>" size="30">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <div align="right"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Reply-To:</font></div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input type="text" name="replyto" value="<? print $replyto; ?>" size="30">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <div align="right"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Subject:</font></div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input type="text" name="subject" value="<? print $subject; ?>" size="58">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <div align="right"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Delay:</font></div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input name="delaySecs" type="text" value="<? print $delaySecs; ?>" size="10">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Put zero '0' for no delay</font></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <div align="right"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Max

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Emails:</font></div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input name="max_emails" type="text" value="<? print $max_emails; ?>" size="10">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Leave blank to send to all emails</font></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <div align="right"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Titles:</font></div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <select name="tags" id="tags" onChange="add_tag()">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <?php print $thetags; ?>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </select>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font></td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td colspan="2">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <div align="center"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <textarea name="message" cols="60" rows="10" wrap="OFF"><? print $message; ?></textarea>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <br>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input type="radio" name="contenttype" value="plain" checked>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Plain

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input type="radio" name="contenttype" value="html">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? HTML </font></div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td height="55" colspan="2">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <table width="100%" border="0" cellspacing="0" cellpadding="1">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="51%" height="31">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <div align="center"> </div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <div align="center"> </div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <div align="center"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input type="button" name="Button" value="Clear All" onClick="clearAll()">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font></div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <td width="49%">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <div align="center"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <input name="submit" type="submit" id="submit" value="<?php print $send_button ?>">

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </font></div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </table>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? </td>

? ? ? ? ? ? ? ? ? ? ? ? ? </tr>

? ? ? ? ? ? ? ? ? ? ? </table>

? ? ? ? ? ? ? ? ? </td>

? ? ? ? ? ? ? </tr>

? ? ? ? ? </table></td>

? </tr>

</table>

</html>

? <?

if ($submit){

?

? //obtain flags

? $start_num = 0;

? $pause=false;$send=false;

? if? ? ? ? ? (strpos($submit, 'Resume')!==false) {$pause=true;}

? else if (strpos($submit, 'Send')!==false)? {$send=true;}

?

?

? if ($pause) {

? ? ? //display sent emails

? ? ? foreach ($HTTP_POST_VARS as $key => $value){

? ? ? ? ? if (strpos($key, 'sentemail')!==false) {? ? ?

? ? ? ? $em = explode('_',$key);

? ? ? ? $last_id = $em[1];

? ? ? ? $email_num = $last_id+1;

? ? ? ? print $email_num.' Sending mail to <font color="#FF00FF">'.$value.'</font><font color="#0000FF"> ... Successfull!</font><br>';

? ? ? ? print '<input name="'.$key.'" type="hidden" value="'.$value.'">';? ?

? ? }

? ? ? }

? ? ? ?

? ? ? if ($submit=='Resume') {

? ? ? ? ? print "Process has been resumed.<br>";

? ? $send=true;

? ? $start_num = $last_id+1;

? ? ? ? ? ? }else{

? ? ? ? ? exit;

? ? ? }? ? ? ? ?

? }?

?

? if ($send) {

? if (!$from || !$subject || !$message || !$emaillist){

? print "Please complete all fields before sending your message.";

? exit;

? }

? //obtain email data

? ? ? $emaillist=trim($emaillist);

? $allemails = split("\n", $emaillist);

? if ($titles_radiogroup == 1) {

? ?

? foreach ($allemails as $key => $row){

? ? if (strpos($row,$term)===false) {

? ? ? ? print "The given termination delimiter was not found, make sure you entered it correctly.";

? ? exit;

? ? }

? ? $emaildata[$key] = explode($term,$row);

? ? if ($enc) {

? ? ? ? foreach ($emaildata[$key] as $key2 => $value) {

? ? ? $emaildata[$key][$key2] = substr($value,1,strlen($value)-2);

? ? }

? ? }

? }

? //determine the email index

? $email_ind = 0;

? $the_titles = explode(',',$titles);

? foreach ($the_titles as $key => $value) {?

? ? $value = strtolower($value);

? ? if (strpos($value,"email")!==false) {

? ? ? ? ? ? ? ? $email_ind = $key;

? ? break;

? ? }

? }

?

? //construct the tag titles array

? foreach ($the_titles as $key => $value) {

? ? ? $st = '%'.$value.'%';

? ? ? $the_titles[$key] = $st;

? }

?

? }

? $numemails = count($allemails);

? if ($max_emails) {

? ? ? $numemails = $max_emails;

? }

? if ($numemails > $tot_emails) {

? ? $numemails = $tot_emails;? ? ?

? }

? ? ?

?

? //process the emails

? for($x=$start_num; $x<$numemails; $x++){

? ? ? ? if ($titles_radiogroup == 1) {$to = $emaildata[$x][$email_ind];}

? ? else{$to = $allemails[$x];}

? ? if ($to){

? ? ? ? ? $to = ereg_replace(" ", "", $to);

? ? ? //replace tag titles

? ? ? $tmp_message = $message;

? ? ? $tmp_subject = $subject;

? ? ? if ($titles_radiogroup == 1) {

? ? ? ? foreach ($the_titles as $key => $value){

? ? ? ? ? ? $message = ereg_replace($value, $emaildata[$x][$key], $message);

? ? ? ? ? ? $subject = ereg_replace($value, $emaildata[$x][$key], $subject);

? ? ? ? }

? ? ? }else{

? ? ? ? $message = ereg_replace("%Email%", $to, $message);

? ? ? ? $subject = ereg_replace("%Email%", $to, $subject);

? ? ? }

? ? ? $email_num = $x+1;

? ? ? ? ? print $email_num.' Sending mail to <font color="#FF00FF">'.$to.'</font>';

? ? ? ? ? print '<input name="sentemail_'.$x.'" type="hidden" value="'.$to.'">';

? ? ? ? ? flush();

? ? ? ? ? $header = "From: $realname <$from>\r\nReply-To: $replyto\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 .= "X-Mailer: GMailer 1.2\r\n";

? ? ? ? ? $header .= "Content-Type: text/$contenttype\r\n";

? ? ? ? ? $header .= "Content-Transfer-Encoding: 8bit\r\n\r\n";

? ? ? ? ? $header .= "$message\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--";

? ? ? ? ? $result = mail($to, $subject, "", $header);

? ? ? ? ? print '<font color="#0000FF"> ... Successfull!</font><br>';

? ? ? ? ? sleep($delaySecs);

? ? ? ? ? flush();

? ? ? $message = $tmp_message;

? ? ? $subject = $tmp_subject;

? ? }

? }

? if ($numemails == $tot_emails) {

? ? ? ? print "Done!<br>";

? }else if ($start_num >= $max_emails) {

? ? ? ? ? ? ? print "Error: you forgot to increase the maximum number of emails.<br>";

? ? $submit = "Send Message";? ? ?

? ? ? }else{

? ? ? ? if ($max_emails) {

? ? ? ? ? ? ? ? if ($ffile) {

? ? ? ? ? ? ? ? ? ? ? ? print 'Process has been paused ... <font color="#FF0000">NOTE: You must re-attach your attached file before resuming.</font><br>';

? ? ? ? ? ? ? ? }else{

? ? ? ? ? ? ? ? ? print 'Process has been paused ... <font color="#0000FF">Enter in the new Maximum number of emails and click the Resume button.</font><br>';

? ? ? ? ? ? ? ? }?

? ? ? ? }?

? }

? }

}

?>

<p align="center">Want to purchase another Inboxing Mailer Program?

<a href="[[url removed, login to view]][1]">

Click Here</a></p>

Kĩ thuật Linux MySQL PHP Quản lí dự án Kiến trúc phần mềm Kiểm tra phần mềm

ID dự án: #3302751

Về dự án

10 đề xuất Dự án từ xa Apr 20, 2010 đang mở

10 freelancer chào giá trung bình$204 cho công việc này

liviussl

See private message.

$85 USD trong 14 ngày
(226 Nhận xét)
6.0
cse031sust02

See private message.

$127.5 USD trong 14 ngày
(67 Nhận xét)
5.7
mariusbucurvw

See private message.

$85 USD trong 14 ngày
(38 Nhận xét)
5.0
YoctoPetaBorg

See private message.

$85 USD trong 14 ngày
(26 Nhận xét)
4.8
mirceah

See private message.

$85 USD trong 14 ngày
(24 Nhận xét)
3.9
setiawanutama

See private message.

$85 USD trong 14 ngày
(48 Nhận xét)
3.8
mlmdeveloperssl

See private message.

$425 USD trong 14 ngày
(3 Nhận xét)
2.7
vw7488765vw

See private message.

$85 USD trong 14 ngày
(11 Nhận xét)
2.6
smartywebvw

See private message.

$127.5 USD trong 14 ngày
(1 Nhận xét)
1.9
coderscentral

See private message.

$850 USD trong 14 ngày
(1 Nhận xét)
0.0