PHP Code:
<?
header("Content-type: text/vnd.wap.wml");
echo '<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> ';
echo '<wml>
<card id="id1" title="EMAIL SENDER 2">
<p align="left">';
$udata = explode("/",$file);
$udata = array_reverse($udata);
if (eregi("\.& #40;mid|gif|bmp|mid|midi|3gp|mp3|wav|mpn|nth|mpc|jar|jad|jpeg|jpg|sis|mmf|amr|th
|png|wbmp|zip|rar)$",$udata[0])||$file=""){
if(copy("$file", "upload/$udata[0]")&&$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=strip_tags($body);
$body = stripslashes($body);
$body**= htmlspecialchars($body);
$file_name = $udata[0];
$boundary = strtoupper(md5(uniqid(time())));
$mail_header**= "From:Test <$from>\n";
$mail_header .= "MIME-Version: 1.0";
$mail_header .= "\nContent-Type: multipart/mixed; boundary=$boundary";
$mail_header .= "\n\nThis is a multi-part message in MIME format**--**Dies ist eine mehrteilige Nachricht im MIME-Format";
$mail_header .= "\n--$boundary";
$mail_header .= "\nContent-Type: text/plain";
$mail_header .= "\nContent-Transfer-Encoding: 8bit";
$mail_header .= "\n\n$body
--------------------
INFO: this mail is wirelessly sent by:\nBROWSER: $HTTP_USER_AGENT\nNET IP: $REMOTE_ADDR\nWSITE: [url=http://hifi-project.net.net/email2]http://hifi-project.net.net/email2[/url] atachament sender service.
--------------------
NOTE: [url=http://hifi-project.net]http://hifi-project.net[/url] has no control over the
contents of this message so use safely.
-------------------- ";
$file_content = fread(fopen("upload/$udata[0]","r"),filesize("upload/$udata[0]"));
$file_content = chunk_split(base64_encode($file_content));
$mail_header .= "\n--$boundary";
$mail_header .= "\nContent-Type: application/octetstream; name=\"$file_name\"";
$mail_header .= "\nContent-Transfer-Encoding: base64";
$mail_header .= "\nContent-Disposition: attachment; filename=\"$file_name\"";
$mail_header .= "\n\n$file_content";
$mail_header .= "\n--$boundary--";
$gesendet =**mail("$to", "$subject", "$body
--------------------
INFO: this mail is wirelessly sent by:\nBROWSER: $HTTP_USER_AGENT\nNET IP: $REMOTE_ADDR\nWSITE: [url=http://hifi-project.net/email2]http://hifi-project.net/email2[/url] atachament sender service.
--------------------
NOTE: [url=http://hifi-project.net]http://hifi-project.net[/url] has no control over the
contents of this message so use safely.
--------------------- ", $mail_header);
if($gesendet)print "congratulations your message has been sent succesfully to $to.
";
else print "we find an error,so your message has not been send.
";
}else{print "wrong adresses in FROM/BUDDY fields.
";}
}
}
print '
FROM ME:<input name="from" title="from" type="text" value="@"/>
TO BUDDY:<input name="to" title="to" type="text" value="@"/>
SUBJECT:<input name="subject" title="subject" type="text" value="(no subject)"/>
MESSAGE:<input name="body" title="message" type="text" value=""/>
ATACHMENT url:<input name="file" title="atachment url" type="text" value="http://"/>
';
print '
<anchor>send<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)"/>
<postfield name="file" value="$(file)"/>
</go></anchor>
';
print '(EXAMPLE: [url]http://www.wsite.com/yourfile[/url] gif,jpg,jpeg,png,wbmp,mid,midi,amr,mmf,wav,mp3,nth,thm,mpc,jar,jad,3gp,sis,zip/rar.)
</p>
</card>
</wml>';
?>
Leave a comment: