Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SMTP -> ERROR: Failed to connect to server: A connection attempt failed
- because the connected party did not properly respond after a period of time,
- or established connection failed because connected host has failed to
- respond. (10060)
- SMTP Error: Could not connect to SMTP host. Message could not be sent.
- Mailer Error: SMTP Error: Could not connect to SMTP host.
- <?php
- $mail->IsSMTP();
- $mail->SMTPDebug = 2;
- $mail->SMTPSecure = 'tls';
- $mail->Host = "smtp.gmail.com";
- $mail->SMTPAuth = true;
- $mail->Username = "rammanoj.potla1608@gmail.com";
- $mail->Password = "marjo741963";
- $mail->port = 587;
- $mail->From = "rammanoj.potla@gmail.com";
- $mail->FromName = "rammanoj";
- $mail->AddAddress("rammanojpotla1608@gmail.com", "ram");
- $mail->WordWrap = 50;
- $mail->IsHTML(true);
- $mail->Subject = "Here is the subject";
- $mail->Body = "This is the HTML message body <b>in bold!</b>";
- $mail->AltBody = "This is the body in plain text for non-HTML mail clients";
- if(!$mail->Send())
- {
- echo "Message could not be sent. <p>";
- echo "Mailer Error: " . $mail->ErrorInfo;
- exit;
- }
- echo "Message has been sent";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement