Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require '../vendor/autoload.php';
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->SMTPDebug = 2;
- $mail->Host = 'smtp.gmail.com';
- $mail->Port = 587;
- $mail->SMTPSecure = 'tls';
- $mail->SMTPAuth = true;
- $mail->Username = "vector41line6@gmail.com";
- $mail->Password = "password";
- $mail->setFrom('vector41line6@gmail.com', 'vector 41 line6');
- $mail->addReplyTo('vector41line6@gmail.com', 'vector 41 line6');
- $mail->addAddress($email);
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = 'Vector 41 Recruitment';
- $mail->Body = "some messages";
- $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
- //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