Reset
Help
Status list all
Send without emailing
';
error_reporting(E_ERROR);
$def_ml = stripslashes($SendList);
$def_from_email = stripslashes($SendEmail);
$def_from_name = stripslashes($SendName);
$def_subject = stripslashes($SendSubject);
$def_body = stripslashes($SendBody);
$def_ml_file = stripslashes($ml_file);
$def_body_file = stripslashes($body_file);
$body_label = "Email Body";
$body_title = "Input your email Body. NAME in the Email Body will be replaced with the name in the Mailing List for each email.";
set_time_limit(0);
if($Action == "Load")
{
if (!file_exists($ml_file))
{
$def_ml_file = "File not found";
}
if(!file_exists($body_file))
{
$def_body_file = "File not found";
}
}
elseif ($Action == "Save")
{
if (file_exists($ml_file))
{
$write_contents = stripslashes($SendList);
$fp = fopen( $ml_file,"w");
fwrite ( $fp,$write_contents);
fclose( $fp );
echo"
Mailing List $ml_file Saved-
";
}
else
{
echo"
Mailing List file $ml_file Not Found-
";
}
if(file_exists($body_file))
{
$write_contents = stripslashes($SendBody);
$fp = fopen( $body_file,"w");
fwrite ( $fp,$write_contents);
fclose( $fp );
echo"
Body file $body_file Saved
";
}
else
{
echo"
Body file $body_file Not Found
";
}
}
elseif ($Action == "Preview")
{
echo"
";
$SendNameIn = stripslashes($SendName);
$SendName = ereg_replace("","",$SendNameIn);
$SendName = trim($SendName);
$SendEmailIn = stripslashes($SendEmail);
$SendEmail = ereg_replace("","",$SendEmailIn);
$SendEmail = trim($SendEmail);
$SendSubjectIn = stripslashes($SendSubject);
$SendSubject = ereg_replace("","",$SendSubjectIn);
$SendSubject = trim($SendSubject);
$from_email = "\"$SendName\"<$SendEmail>";
$SendBodyIn = stripslashes($SendBody);
$SendBody = ereg_replace("<","<",$SendBodyIn);
$ml_lines = explode ( "
",$SendList );
list( $email,$name ) = explode( ',',$ml_lines[0] );
$email = trim($email);
$name = trim($name);
echo"
";
$SendBodyAdj = str_replace("NAME",$name,$SendBody);
$send_lines = explode ( "
",$SendBodyAdj );
foreach ( $send_lines as $sendline )
{
$sendline = rtrim($sendline);
echo"
";
}
echo"
";
$def_from_email = $SendEmailIn;
$def_from_name = $SendNameIn;
$def_subject = $SendSubjectIn;
$def_body = $SendBodyIn;
if ($email)
{
$ml_num = count($ml_lines);
}
else
{
$ml_num = 0;
}
echo"
Current Mailing List contacts $ml_num
";
}
elseif ($Action == "Send")
{
if ($NoSend)
{
echo"Send without Emailing -";
}
echo"
Sending.....
";
$SendNameIn = stripslashes($SendName);
$SendName = ereg_replace("","",$SendNameIn);
$SendName = trim($SendName);
$SendEmailIn = stripslashes($SendEmail);
$SendEmail = ereg_replace("","",$SendEmailIn);
$SendEmail = trim($SendEmail);
$SendSubjectIn = stripslashes($SendSubject);
$SendSubject = ereg_replace("","",$SendSubjectIn);
$SendSubject = trim($SendSubject);
$from_email = "$SendName<$SendEmail>";
$SendBody = stripslashes($SendBody);
$count = 0;
$ml_lines = explode ( "
",$SendList );
$ml_num = count($ml_lines);
foreach ( $ml_lines as $mlline )
{
list( $email,$name ) = explode( ',',$mlline );
$email = trim($email);
$name = trim($name);
if ($email)
{
$SendBodyAdj = str_replace("NAME",$name,$SendBody);
set_time_limit ( 30 );
$count = $count+1;
if($NoSend)
{
if($ListAll)
{
$sendCk = "$count, OK $email; ";
}
else
{
$sendCk = "$count; ";
}
}
else
{
$xheaders="Content-Type: text/html;charset='iso-8859-1'
";
$xheaders.="From:$from_email
";
$xheaders.="Reply-To:$from_email
Return-path:$SendEmail
X-Mailer: PHP/".phpversion();
if(mail($email,$SendSubject,$SendBodyAdj,$xheaders))
{
if($ListAll)
{
$sendCk = "$count, OK $email; ";
}
else
{
$sendCk = "$count; ";
}
}
else
{
$sendCk = "$count, FAIL $email; ";
}
}
echo"
";
}
}
echo"
Send Complete. Emails sent $count.
";
$def_from_email = $SendEmailIn;
$def_from_name = $SendNameIn;
$def_subject = $SendSubjectIn;
$def_body = $SendBodyAdj;
$body_label = "Last Email Body Sent";
$body_title = "This is the body of the last email sent.";
}
elseif ($Action=="Fail")
{
echo"
softSWOT access is broken and is required for evaluation software, click for solutions.
";
}
else
{
$def_ml_file = $user_ml_file;
$def_body_file = $user_body_file;
$def_from_email = $user_from_email;
$def_from_name = $user_from_name;
$def_subject = $user_subject;
$def_ml = stripslashes($SendList);
$def_body = stripslashes($SendBody);
}
;echo '
|