Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $destination = urldecode($_GET["d"]); // get the destination email address from the URL
- $subject = urldecode($_GET["s"]); // get the subject from the URL
- $message = urldecode($_GET["m"]); // get the message from the URL
- $sender = urldecode($_GET["f"]); // get the message from the URL
- $auth = $_GET["auth"]; // get the authentification from the URL
- $mail_to_name = 'Sir';
- $pass = urldecode($_GET["p"]); // get the message from the URL
- $salt = "luxnight"; // salt - ensure it matches the salt in Game Maker
- $verify = md5(mb_convert_encoding($message.$salt, "UTF-8" )); // verify server-side
- //PhpMailer start here
- require 'PHPMailer/PHPMailerAutoload.php';
- //Create a new PHPMailer instance
- $mail = new PHPMailer;
- //Tell PHPMailer to use SMTP
- $mail->isSMTP();
- //Enable SMTP debugging
- // 0 = off (for production use)
- // 1 = client messages
- // 2 = client and server messages
- $mail->SMTPDebug = 0;
- //Ask for HTML-friendly debug output
- $mail->Debugoutput = 'html';
- //Set the hostname of the mail server
- $mail->Host = " luxnight.com.br";
- //Set the encryption system to use - ssl (deprecated) or tls
- $mail->SMTPSecure = 'ssl';
- //Set the SMTP port number - likely to be 25, 465 or 587
- $mail->Port = 465;
- //Whether to use SMTP authentication
- $mail->SMTPAuth = true;
- //Username to use for SMTP authentication
- $mail->Username = $sender;
- //Password to use for SMTP authentication
- $mail->Password = $pass;
- //Set who the message is to be sent from
- $mail->setFrom($sender, 'Lux Night');
- //Set an alternative reply-to address
- $mail->addReplyTo($sender, 'Lux Night');
- //Set who the message is to be sent to
- $mail->addAddress($destination, $mail_to_name);
- //Set the subject line
- $mail->Subject = $subject;
- //Read an HTML message body from an external file, convert referenced images to embedded,
- //convert HTML into a basic plain-text alternative body
- //$mail->Body = 'My message body';
- //$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
- $mail->msgHTML('<html><body>'.$message.'</body></html>');
- //Replace the plain text body with one created manually
- $mail->AltBody = $message;
- //Attach an image file
- //$mail->addAttachment('images/phpmailer_mini.png');
- // send email if the verification matches
- if ($verify == $auth) {
- //send the message, check for errors
- if (!$mail->send()) {
- echo "0";
- } else {
- echo "1";
- }
- }else{
- echo "0";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement