Note that there are some explanatory texts on larger screens.

plurals
  1. POSMTP PHPMailer doesn't work
    primarykey
    data
    text
    <p>I tried to use google as SMTP server like <a href="https://stackoverflow.com/questions/7525855/problem-with-using-phpmailer-for-smtp">this</a> but it cannot send mail. How to fix it? It seems that there is firewall which blocks my script.</p> <pre><code>&lt;?php require("PHPMailer_5.2.4/class.phpmailer.php"); $mail = new PHPMailer(); $mail-&gt;SMTPDebug = true; $mail-&gt;IsSMTP(); // telling the class to use SMTP $mail-&gt;SMTPAuth = true; // SMTP authentication $mail-&gt;Host = "smtp.gmail.com"; // SMTP server $mail-&gt;Port = 465; // SMTP Port $mail-&gt;Username = "emerald.hieu.test@gmail.com"; // SMTP account username $mail-&gt;Password = "xxx"; // SMTP account password $mail-&gt;SetFrom('emerald.hieu.test@gmail.com', 'Hieutot'); // FROM $mail-&gt;AddReplyTo('emerald.hieu.test@gmail.com', 'Hieutot'); // Reply TO $mail-&gt;AddAddress('nguyen.hieu@xxx.vn', 'HieuND2'); // recipient email $mail-&gt;Subject = "First SMTP Message"; // email subject $mail-&gt;Body = "Hi! \n\n This is my first e-mail sent through Google SMTP using PHPMailer."; if(!$mail-&gt;Send()) { echo 'Message was not sent.'; echo 'Mailer error: ' . $mail-&gt;ErrorInfo; } else { echo 'Message has been sent.'; } </code></pre> <p>This is my log:</p> <pre><code>SMTP -&gt; get_lines(): $data was "" SMTP -&gt; get_lines(): $str is "" SMTP -&gt; get_lines(): $data is "" SMTP -&gt; get_lines(): timed-out (10 seconds) SMTP -&gt; FROM SERVER: SMTP -&gt; get_lines(): $data was "" SMTP -&gt; get_lines(): $str is "" SMTP -&gt; get_lines(): $data is "" SMTP -&gt; FROM SERVER: SMTP -&gt; ERROR: EHLO not accepted from server: SMTP -&gt; FROM SERVER: SMTP -&gt; ERROR: HELO not accepted from server: SMTP -&gt; ERROR: AUTH not accepted from server: SMTP -&gt; NOTICE: EOF caught while checking if connectedThe following From address failed: emerald.hieu.test@gmail.com : Called Mail() without being connected Message was not sent.Mailer error: The following From address failed: emerald.hieu.test@gmail.com : Called Mail() without being connected </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload