Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2017-12-05 13:00:26 Connection: opening to smtp.gmail.com:587, timeout=300, options=array ( 'ssl' => array ( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true, ),)
- 2017-12-05 13:00:26 Connection: opened
- 2017-12-05 13:00:26 SMTP INBOUND: "220 smtp.gmail.com ESMTP f3sm245851pgt.15 - gsmtp"
- 2017-12-05 13:00:26 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP f3sm245851pgt.15 - gsmtp
- 2017-12-05 13:00:26 CLIENT -> SERVER: EHLO localhost
- 2017-12-05 13:00:27 SMTP INBOUND: "250-smtp.gmail.com at your service, [110.36.136.72]"
- 2017-12-05 13:00:27 SMTP INBOUND: "250-SIZE 35882577"
- 2017-12-05 13:00:27 SMTP INBOUND: "250-8BITMIME"
- 2017-12-05 13:00:27 SMTP INBOUND: "250-STARTTLS"
- 2017-12-05 13:00:27 SMTP INBOUND: "250-ENHANCEDSTATUSCODES"
- 2017-12-05 13:00:27 SMTP INBOUND: "250-PIPELINING"
- 2017-12-05 13:00:27 SMTP INBOUND: "250-CHUNKING"
- 2017-12-05 13:00:27 SMTP INBOUND: "250 SMTPUTF8"
- 2017-12-05 13:00:27 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [110.36.136.72]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
- 2017-12-05 13:00:27 CLIENT -> SERVER: STARTTLS
- 2017-12-05 13:00:27 SMTP INBOUND: ""
- 2017-12-05 13:00:27 SERVER -> CLIENT:
- 2017-12-05 13:00:27 SMTP ERROR: STARTTLS command failed:
- SMTP Error: Could not connect to SMTP host.
- 2017-12-05 13:00:27 SMTP NOTICE: EOF caught while checking if connected
- 2017-12-05 13:00:27 Connection: closed
- SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
- Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
- use PHPMailerPHPMailerPHPMailer;
- use PHPMailerPHPMailerOAuth;
- use LeagueOAuth2ClientProviderGoogle;
- require '../../vendor/autoload.php';
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->SMTPDebug = 4;
- $mail->Host = 'smtp.gmail.com';
- $mail->Port = 587;
- $mail->SMTPSecure = 'tls';
- $mail->SMTPAuth = true;
- $mail->SMTPAutoTLS = false;
- $mail->SMTPOptions = array(
- 'ssl' => array(
- 'verify_peer' => false,
- 'verify_peer_name' => false,
- 'allow_self_signed' => true
- )
- );
- $mail->Username = $from_address;
- $mail->Password = $from_password;
- $mail->SetLanguage("tr", "phpmailer/language");
- $mail->CharSet = "utf-8";
- $mail->Encoding = "base64";
- $mail->SetFrom($from_address, $from_name);
- foreach ($to_email_list as $to) {
- $mail->AddAddress($to);
- }
- $mail->AddReplyTo($from_address, $from_name);
- $mail->Subject = $email_subject;
- //Creating Email Body
- $message = "<html>n";
- $message .= "<body>n";
- $message .= '<p>Greetings,</p>';
- $message .= '<p>' . $email_message . '</p>';
- $message .= "</body>n";
- $message .= "</html>n";
- $mail->isHTML(true);
- $mail->MsgHTML($message);
- if(!$mail->Send()) {
- echo "On Port: " . $from_smtp_port . " </br> Mailer Error: " . $mail->ErrorInfo;
- } else {
- echo "Message sent! on Port " . $from_smtp_port . "</br>";
- foreach($to_email_list as $list){
- echo $list . "</br>";
- }
- }
Add Comment
Please, Sign In to add comment