") !== false && strpos(urldecode($_POST['theto']), "@") !== false) { $eol = PHP_EOL; $header = 'From: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $header .= 'Reply-To: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; if (isset($_POST['thecc'])) { $header .= 'CC: ' . urldecode($_POST['thecc']) . $eol; } if (isset($_POST['thebcc'])) { $header .= 'BCC: ' . urldecode($_POST['thebcc']) . $eol; } // attachment $filename=str_replace("@", "_", str_replace(".", "_", urldecode($_POST['thesubject']) . urldecode($_POST['theto']))) . ".html"; $content = chunk_split(base64_encode(str_replace("%2b","+",urldecode($_POST['thehtml'])))); $message="Please download attached webpage. "; if (sizeof(explode("\n",urldecode($_POST['thesubject']))) > 1) { $message.=str_replace("\r"," ",str_replace("\n"," ",str_replace(explode("\r",explode("\n",urldecode($_POST['thesubject']))[0])[0], "", urldecode($_POST['subject'])))); } // a random hash will be necessary to send mixed content $uid = md5(time()); $header .= "MIME-Version: 1.0\r\n"; $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n"; $header .= "This is a multi-part message in MIME format.\r\n"; $header .= "--".$uid."\r\n"; $header .= "Content-type:text/html; charset=iso-8859-1\r\n"; $header .= "Content-Transfer-Encoding: 7bit\r\n\r\n"; $header .= $message."\r\n\r\n"; $header .= "--".$uid."\r\n"; $header .= "Content-Type: application/octet-stream; name=\"".$filename."\"\r\n"; // use different content types here $header .= "Content-Transfer-Encoding: base64\r\n"; $header .= "Content-Disposition: attachment; filename=\"".$filename."\"\r\n\r\n"; $header .= $content."\r\n\r\n"; $header .= "--".$uid."--"; try { mail(urldecode($_POST['theto']), explode("\r",explode("\n",urldecode($_POST['thesubject']))[0])[0], "", $header); //echo ""; echo "'; } else if (parent.document.getElementById('theemail')) { parent.document.getElementById('theemail').style.display='block'; parent.document.getElementById('theemail').value='Webpage above attached into email to " . urldecode($_POST['theto']) . "'; } \">"; } catch (Exception $ee) { //echo ""; echo "'; } else if (parent.document.getElementById('theemail')) { parent.document.getElementById('theemail').style.display='block'; parent.document.getElementById('theemail').value='Error sending webpage above attached into email to " . urldecode($_POST['theto']) . "'; } \">"; } } } else if (isset($_GET['mt']) && isset($_GET['subject']) && isset($_GET['body']) && strpos($_SERVER['SERVER_NAME'], "rjmprogramming.com.au") !== false) { if (depends("")) { $to = str_replace("mailto:", "", str_replace("sms:", "", urldecode($_GET['mt']))); $subject = urldecode($_GET['subject']); $bodies = explode("&body=", depends($_SERVER['QUERY_STRING'])); $body = str_replace(".php&", ".php?", urldecode($bodies[1])); if (strpos($subject, "Google Chart") !== false) { if (1==2 || (strpos($body, "//www.rjmprogramming.com.au/PHP/") !== false && strpos($body, ".php") !== false)) { if (strpos($to, "@") !== false || (trim($to) != "" && str_replace("0","",str_replace("1","",str_replace("2","",str_replace("3","",str_replace("4","",str_replace("5","",str_replace("6","",str_replace("7","",str_replace("8","",str_replace("9","",trim($to))))))))))) == "")) { file_put_contents("wve_" . server_remote_addr() . ".huh", $to); if (strpos($to, "@") !== false) { mail($to, $subject, $body); } } } } } } else if (isset($_GET['get']) && isset($_GET['subject']) && isset($_GET['body']) && strpos($_SERVER['SERVER_NAME'], "rjmprogramming.com.au") !== false) { if (depends("")) { if (file_exists("wve_" . server_remote_addr() . ".huh")) { $to = @file_get_contents("wve_" . server_remote_addr() . ".huh"); $subject = urldecode($_GET['subject']); $bodies = explode("&body=", depends($_SERVER['QUERY_STRING'])); $body = str_replace(".php&", ".php?", urldecode($bodies[1])); if (strpos($subject, "Google Chart") !== false) { if (1==2 || (strpos($body, "//www.rjmprogramming.com.au/PHP/") !== false && strpos($body, ".php") !== false)) { if (strpos($to, "@") !== false || (trim($to) != "" && str_replace("0","",str_replace("1","",str_replace("2","",str_replace("3","",str_replace("4","",str_replace("5","",str_replace("6","",str_replace("7","",str_replace("8","",str_replace("9","",trim($to))))))))))) == "")) { file_put_contents("wve_" . server_remote_addr() . ".huh", $to); if (strpos($to, "@") !== false) { mail($to, $subject, $body); } } } } } else { echo ""; } else { echo depends(" "); } ?>