Untitled

 avatar
unknown
php
4 years ago
1.3 kB
6
Indexable
<?php

    $to = $_POST['email'];
    $code = $_POST['code'];
    $temp = 123;

    if (empty($to)) {
        echo "Please Enter a valid Email";
    }

    $subject = "Photo Save Vault Access Code:".$code;

    // Message
    $message = "
        <html>
            <head>
              <title>Photo Save Vault Access Code</title>
            </head>
            <body>
              <h2>Welcome!</h2>
              <br>
              <p>Your test access code is: <?= $temp ?></p>
              <p>Please enter this code to confirm your identy.</p>
              <br>
              <p>Did not your access code? than you can ignore this email.</p>
              <br><br>
              <p>Best Regards</p>
              <p>Photo Save Vault Support</p>
            </body>
        </html>
        ";

    // To send HTML mail, the Content-type header must be set
    $headers[] = 'MIME-Version: 1.0';
    $headers[] = 'Content-type: text/html; charset=iso-8859-1';
    
    // Additional headers
    //$headers[] = 'To: <$to>';
    $headers[] = 'From: Photo Save Vault <no-replay@appnotrix.com>';
    //$headers[] = 'Cc: example@example.com';
    //$headers[] = 'Bcc: example@example.com';
    
    // Mail it
    mail($to, $subject, $message, implode("\r\n", $headers));
?>
Editor is loading...