Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require 'PHPMailer\PHPMailerAutoload.php';
- require 'credentials.php';
- $email = $_POST['email'];
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->SMTPDebug = 2;
- $mail->Debugoutput = 'html';
- $mail->Host = 'smtp.gmail.com';
- $mail->Port = '587';
- $mail->SMTPSecure = 'tls';
- $mail->SMTPAuth = true;
- $mail->Username = $username;
- $mail->Password = $password;
- $mail->setFrom($username);
- $mail->addAddress($email);
- $mail->Subject = 'You have signed up for 3rd Party OWL';
- $mail->Body = 'Welcome, the first match will be on May 30th';
- //send the message, check for errors
- if (!$mail->send()) {
- echo "Mailer Error: " . $mail->ErrorInfo;
- } else {
- echo "Message sent!";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement