Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. <?php
  2. require 'PHPMailerAutoload.php';
  3. $mail = new PHPMailer;
  4. $mail->setFrom('from@example.com', 'Your Name');
  5. $mail->addAddress('myfriend@example.net', 'My Friend');
  6. $mail->Subject = 'First PHPMailer Message';
  7. $mail->Body = 'Hi! This is my first e-mail sent through PHPMailer.';
  8. if(!$mail->send()) {
  9. echo 'Message was not sent.';
  10. echo 'Mailer error: ' . $mail->ErrorInfo;
  11. } else {
  12. echo 'Message has been sent.';
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement