Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
698
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. $mail->isSMTP(); // Set mailer to use SMTP
  2. $mail->Host = 'mail.pondokit.com'; // Specify main and backup SMTP servers
  3. $mail->SMTPDebug = 2;
  4. $mail->SMTPAuth = true; // Enable SMTP authentication
  5. $mail->Username = 'mail@pondokit.com'; // SMTP username
  6. $mail->Password = 'password'; // SMTP password
  7. $mail->Port = 465;
  8.  
  9. $mail->setFrom('jihantoro2@gmail.com', 'Rubi Jihantoro');
  10. $mail->addAddress('jihantoro8@gmail.com', 'Joe User'); // Add a recipient
  11. $mail->isHTML(true); // Set email format to HTML
  12.  
  13. $mail->Subject = 'Here is the subject';
  14. $mail->Body = 'This is the HTML message body <b>in bold!</b>';
  15. $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
  16.  
  17. if(!$mail->send()) {
  18. echo 'Message could not be sent.';
  19. echo 'Mailer Error: ' . $mail->ErrorInfo;
  20. } else {
  21. echo 'Message has been sent';
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement