Advertisement
Guest User

mail.php

a guest
Dec 9th, 2015
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ///mail.php
  2. /*
  3. <?php
  4.     $destination = urldecode($_GET["d"]); // get the destination email address from the URL
  5.     $subject = urldecode($_GET["s"]); // get the subject from the URL
  6.     $message = urldecode($_GET["m"]); // get the message from the URL
  7.     $sender = urldecode($_GET["f"]); // get the message from the URL
  8.     $auth = $_GET["auth"]; // get the authentification from the URL
  9.    
  10.     $salt = "mysalt123"; // salt - ensure it matches the salt in Game Maker
  11.    
  12.     $verify = md5(mb_convert_encoding($message.$salt, "UTF-8" )); // verify server-side
  13.    
  14.     $headers = "From: " . $sender . "\r\n"; // set the sender address (you) as "From"
  15.     $headers .= "Reply-To: ". $sender ."\r\n"; // append sender address to header for reply
  16.     $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; // allow text and html in the email body
  17.    
  18.     // send email if the verification matches
  19.     if ($verify == $auth) {
  20.         mail($destination, $subject, $message, $headers );
  21.         echo "1";
  22.     }
  23.     else{
  24.         echo "0";
  25.     }
  26. ?>*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement