Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mail->Host = 'mail.example.in';
- $mail->Port = 25;
- $mail->SMTPAuth = true;
- $mail->Username = 'user@example.in';
- $mail->Password = 'password';
- $mail->setFrom("user@example.in" , "User");
- $mail->addAddress('receiver@example.in', 'Receiver');
- $mail->addBCC('anotheruser@somedomain.com', 'Another user');
- $mail->AddReplyTo('user@example.in', 'User');
- $mail->isHTML(true);
- $mail->Subject = $subject;
- $mail->Body = $message;
- if($mail->send())
- echo "Your request has been received. We will soon contact you.";
- else echo "Unable to send your request. Please try again";
- SMTP ERROR: Failed to connect to server: Connection timed out (110)
- SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement