This is a snippet of code I cut out from a form I use.. and sending it
through using your SMTP server.. here from my website code
name is a var created...looking down the code one can see the EMAIL header
being created,, TO: FROM: SUBJECT, REPLY etc..
Hope this helps giving you ideas
Rod
<td width="65%" valign="top" height="48">
<div align="center">
<p align="left"><font size="2">john (AT) doe (DOT) com</font> <br>
<input maxlength=50 name=to_mail size=50>
<br>
.......................
APP;
$subject ="Your coupon requested from BLAS";
$from_mail ="email (AT) bestlittleadspace (DOT) com";
$from_name ="BestLittleAdSpace.com";
$signature ="Mailed by BestLittleAdSpace.com/buynSell";
$bcc_mail ="mastar_rod (AT) yahoo (DOT) com";
//here are some error messages.
$tomail_error="Bad email address."; //If receiver mail is
wrong
$error_title="wrong parameters"; //title of page
$back='#fffffff'; //background of error page
$text='#0000000'; //text colour of error page
$h2='#000000'; //heading colour of error page
$error_message="The following error occurred.. Please re-enter. ";
//message for visitor.
$result=1;
if ($to_mail!==""){
if (!eregi("^.+@.+\\..+$", $to_mail)){
$error6="<li>$tomail_error</li>";
$result=0;
}
}
else{
$to_mail=trim($to_mail);
}
if ($to_mail==""){
$error6="<li>$tomail_error</li>";
$result=0;
}
if ($result==1){
$body="$message\n";
$body.="-------------------------------- \n";
$body.="Senders IP address: $ipaddr\n";
$body.=$signature;
$from="\"$from_name\" <$from_mail>";
$headers.="Bcc: $bcc_mail \n";
$headers.="Content-Type: text/html; charset=windows-1254\n";
$headers ="From: $from\nX-Mailer: System33r";
mail($to_mail,$subject,$body,$headers);
$isSent="Your coupon has been sent";
echo ("<body bgcolor=$back text=$text><center><h2><font
color='$h2'>$isSent</font></h2></center></center></body>");
}
--
Rod Minarik, MASTAR Telemessaging
Answering Service Software & Systems
www.mastar.com www.freewebdevelop.com
Full Service Graphics & Web Development
"Michael's opinion" <fordmon93711 (AT) prodigy (DOT) net> wrote
Quote:
How in the world do you use mailto: . I have tried over and over again to
do
this using <FORM> </FORM>...I have several fields and am trying to get it
to
POST to my Email server..ex: FNAME=Joseph LNAME=Smith etc. |