Guest User

Untitled

a guest
Mar 30th, 2018
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. <?php include("phpmailer/PHPMailerAutoload.php");
  2. $mail = new PHPMailer;
  3. $mail->isSMTP();
  4. $mail->Host = 'smtp.sendgrid.net';
  5. $mail->SMTPAuth = true;
  6. $mail->Username = 'takmeel'; // SMTP username
  7. $mail->Password = 'shineE065'; // SMTP password
  8. $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
  9. $mail->Port = 25; // TCP port to connect to
  10.  
  11. $mail->setFrom("info@shuraemirates.com", 'Shura Emirates');
  12. $mail->addAddress('taleeb.takmeel@gmail.com' , 'Taleeb Ahmad'); // Add a recipient
  13.  
  14. $mail->isHTML(true); // Set email format to HTML
  15.  
  16. $mail->Subject = 'Test';
  17. $mail->Body = 'Hello';
  18. $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
  19.  
  20. if(!$mail->send()) {
  21. echo 'Message could not be sent.';
  22. echo 'Mailer Error: ' . $mail->ErrorInfo;
  23. } else { ?>
  24. <h3 style="color:#000;font-size: 14px;margin-bottom: 10px;">Thank you for contacting us. We will get back to you soon.</h3>
  25. <?php } ?>
Add Comment
Please, Sign In to add comment