| px | top | add code | search | signup | login | help |
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>WHO</title>
</head>
<body>
<form method="GET" action="w2w.php3" enctype="application/x-www-form-urlencoded">
<!--webbot bot="SaveResults" U-File="M:\dev\_private\form_results.txt"
S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<p> </p>
<p align="center"><b><font size="6">WHO-TO-WHO (W2W)</font></b></p>
<p align="center"><font size="3"><b>E-mail Messaging</b></font></p>
<p><p align="center"><font size="3"><b>We're watching you.</b></font></p>
<table border="1" width="80%" height="482">
<tr>
<td width="8%" height="23">Format:</td>
<td width="92%" height="23"><!--webbot bot="Validation"
S-Display-Name="mtype" B-Value-Required="TRUE" --><select size="1" name="mtype">
<option selected>TEXT</option>
<option>HTML</option>
</select></td>
</tr>
<tr>
<td width="8%" height="23">To: </td>
<td width="92%" height="23"><input type="text" name="to" size="30">
(name) <input type="text" name="toem" size="40">
(email)</td>
</tr>
<tr>
<td width="8%" height="23">From: </td>
<td width="92%" height="23"><input type="text" name="from" size="30">
(name) <input type="text" name="fromem" size="40">
(email)</td>
</tr>
<tr>
<td width="8%" height="23">Subject:</td>
<td width="92%" height="23"><input type="text" name="subj" size="60"></td>
</tr>
<tr>
<td width="8%" height="389">Message lines:</td>
<td width="92%" height="389">
<p style="line-height: 100%"><input type="text" name="msg1" size="80">
(1)</p>
<p style="line-height: 100%"><input type="text" name="msg2" size="80">
(2)</p>
<p style="line-height: 100%"><input type="text" name="msg3" size="80">
(3)</p>
<p style="line-height: 100%"><input type="text" name="msg4" size="80">
(4)</p>
<p style="line-height: 100%"><input type="text" name="msg5" size="80">
(5)</p>
<p style="line-height: 100%"><input type="text" name="msg6" size="80">
(6)</p>
<p style="line-height: 100%"><input type="text" name="msg7" size="80">
(7)</p>
<p style="line-height: 100%"><input type="text" name="msg8" size="80">
(8)</p>
<p style="line-height: 100%"><input type="text" name="msg9" size="80">
(9)</p>
<p style="line-height: 100%"><input type="text" name="msg10" size="80">
(10)</p>
<p style="line-height: 100%"><input type="text" name="msg11" size="80">
(11)</p>
<p style="line-height: 100%"><input type="text" name="msg12" size="80">
(12)</p>
<p style="line-height: 100%"><input type="text" name="msg13" size="80">
(13)</p>
</td>
</tr>
</table>
<p align="center">
<input type="submit" value="Send Mail" name="B1" action="w2w.php3">
<input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
<!--- ABOVE IS FOR SEPARATE HTML FILE, BELOW IS SEPARATE PHP FILE --->
<?php
$mtype=$HTTP_GET_VARS['mtype'];
$to=$HTTP_GET_VARS['to'];
$toem=$HTTP_GET_VARS['toem'];
$from=$HTTP_GET_VARS['from'];
$fromem=$HTTP_GET_VARS['fromem'];
$subj=$HTTP_GET_VARS['subj'];
$msg1=$HTTP_GET_VARS['msg1'];
$msg2=$HTTP_GET_VARS['msg2'];
$msg3=$HTTP_GET_VARS['msg3'];
$msg4=$HTTP_GET_VARS['msg4'];
$msg5=$HTTP_GET_VARS['msg5'];
$msg6=$HTTP_GET_VARS['msg6'];
$msg7=$HTTP_GET_VARS['msg7'];
$msg8=$HTTP_GET_VARS['msg8'];
$msg9=$HTTP_GET_VARS['msg9'];
$msg10=$HTTP_GET_VARS['msg10'];
$msg11=$HTTP_GET_VARS['msg11'];
$msg12=$HTTP_GET_VARS['msg12'];
$msg13=$HTTP_GET_VARS['msg13'];
//--- subject ---
$subject="$subj";
//--- email ---
$email = "$toem";
//--- message ---
$message = "$msg1\n\n";
$message .= "$msg2\n\n";
$message .= "$msg3\n\n";
$message .= "$msg4\n\n";
$message .= "$msg5\n\n";
$message .= "$msg6\n\n";
$message .= "$msg7\n\n";
$message .= "$msg8\n\n";
$message .= "$msg9\n\n";
$message .= "$msg10\n\n";
$message .= "$msg11\n\n";
$message .= "$msg12\n\n";
$message .= "$msg13\n\n";
//--- you can add a stock signature ---
//$message .= "--\r\n"; //Signature delimiter
//--- additional header pieces for errors, From cc's, bcc's, etc ---
$headers .= "From: <$fromem>\n";
$headers .= "X-Sender: <$fromem>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: <$fromem>\n"; // Return path for errors
if ($mtype = "HTML") {
$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type
}
// SCRAP:
//$headers .= "From: Name<mail@server.com>\n";
//$headers .= "X-Sender: <mail@server.com>\n";
//$headers .= "X-Mailer: PHP\n"; //mailer
//$headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
//$headers .= "Return-Path: <mail@server.com>\n";
//Uncomment this to send html format
//$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
//$headers .= "cc: birthdayarchive@php.net\n"; // CC to
//$headers .= "bcc: mail@server.com"; // BCCs to, separete
//multiple with commas mail@mail.com, mail2@mail.com
//--- and now mail it ---
mail($email, $subject, $message, $headers);
echo('<br><html>');
echo('<br><body>');
echo("<br>EXCELLENT!!!");
printf ("<br><br>To: %s %s",$to, $toem);
printf ("<br>From: %s %s",$from, $fromem);
printf ("<br><br>Subject: %s",$subj);
print ("<br><br>Message:");
printf ("<br>%s",$msg1);
printf ("<br>%s",$msg2);
printf ("<br>%s",$msg3);
printf ("<br>%s",$msg4);
printf ("<br>%s",$msg5);
printf ("<br>%s",$msg6);
printf ("<br>%s",$msg7);
printf ("<br>%s",$msg8);
printf ("<br>%s",$msg9);
printf ("<br>%s",$msg10);
printf ("<br>%s",$msg11);
printf ("<br>%s",$msg12);
printf ("<br>%s",$msg13);
printf ("<br>%s",$msg14);
printf ("<br>%s",$msg15);
printf ("<br>%s",$msg16);
printf ("<br>%s",$msg17);
printf ("<br>%s",$msg18);
printf ("<br>%s",$msg19);
printf ("<br>%s",$msg20);
echo('</body>');
echo('</html>');
?>
Comments or questions?
PX is running PHP 5.2.11
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.