<?
header("Content-type: text/vnd.wap.wml");
$timeadjust = "+45000";
$adj = ($timeadjust*120);
$tn = date("H:i:s",time() + $adj);
$date = date("l, d F Y h:i a",time() + $timeadjust);
echo '<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="id1" title="Mail Sender">
<p align="left">';
if($send){
if(preg_match("([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})",$to)&&preg_match("([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})",$from)){
$body  = htmlspecialchars($body);
$gesendet =  mail("$to", "$subject", "$body

FREE 2-WAP.NET SEND EMAIL SERVICE
---------------------------------------------------
This mail is Wirelessly sent by a:
$HTTP_USER_AGENT $REMOTE_ADDR at: $date
through http://2-wap.net leading free downloads portal in wap
---------------------------------------------------
Please note that 2-WAP.NET has no control over the
contents of this message.
---------------------------------------------------", "From: $from");
if($gesendet)print "Email has been sent to $to<br/>";
else print "Error, email not send!<br/>";
}else{print "Wrong adresses in From:/To: fields!<br/>";}
}
print '<small><b>Send Any Free Mail</b></small><br/>
<small><b>From:</b></small><br/>
<input name="from" title="from" type="text" value="@"/><br/>
<small><b>To:</b></small><br/>
<input name="to" title="to" type="text" value="@"/><br/>
<small><b>Subject:</b></small><br/>
<input name="subject" title="subject" type="text" value="(no subject)"/><br/>
<small><b>Mailbody:</b></small><br/>
<input name="body" title="text" type="text" value=""/><br/>
<small><b><anchor>Send Now<go href="'.$_SERVER["PHP_SELF"].'?send=1" method="post">
<postfield name="from" value="$(from)"/>
<postfield name="to" value="$(to)"/>
<postfield name="subject" value="$(subject)"/>
<postfield name="body" value="$(body)"/>
</go></anchor></b></small>';
print '<small><br/>---<br/><a href="index.php">Back</a><br/><b>&#169; 2-WAP.NET</b></small>
</p>
</card>
</wml>';
?>