Advertisement
Guest User

Untitled

a guest
Sep 16th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. $mail->Host = 'mail.example.in';
  2. $mail->Port = 25;
  3. $mail->SMTPAuth = true;
  4. $mail->Username = 'user@example.in';
  5. $mail->Password = 'password';
  6.  
  7. $mail->setFrom("user@example.in" , "User");
  8. $mail->addAddress('receiver@example.in', 'Receiver');
  9. $mail->addBCC('anotheruser@somedomain.com', 'Another user');
  10. $mail->AddReplyTo('user@example.in', 'User');
  11.  
  12. $mail->isHTML(true);
  13.  
  14. $mail->Subject = $subject;
  15. $mail->Body = $message;
  16. if($mail->send())
  17. echo "Your request has been received. We will soon contact you.";
  18. else echo "Unable to send your request. Please try again";
  19.  
  20. SMTP ERROR: Failed to connect to server: Connection timed out (110)
  21. SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement