Note that there are some explanatory texts on larger screens.

plurals
  1. POunable to connect while sending the mail in php using the PHP mailer
    primarykey
    data
    text
    <p>I downlaoded a mailer file from <a href="https://github.com/PHPMailer/PHPMailer" rel="nofollow">https://github.com/PHPMailer/PHPMailer</a> and tried to used in my program to send email, but it lead me to some error . first let have a look at the code <pre><code>include 'PHPMailer-master/class.phpmailer.php'; include 'PHPMailer-master/class.smtp.php'; $mail = new PHPMailer(); // create a new object $mail-&gt;IsSMTP(); // enable SMTP $mail-&gt;SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only $mail-&gt;SMTPAuth = true; // authentication enabled $mail-&gt;SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail $mail-&gt;Host = 'ssl://smtp.gmail.com'; $mail-&gt;Port = 587; // or 587 $mail-&gt;IsHTML(true); $mail-&gt;Username = "........@gmail.com"; $mail-&gt;Password = "*****"; $mail-&gt;SetFrom('.....@gmail.com'); $mail-&gt;Subject = "Test"; $mail-&gt;Body = "this the mail for subscription"; $mail-&gt;AddAddress('......@gmail.com'); if(!$mail-&gt;Send()) { echo "Mailer Error: " . $mail-&gt;ErrorInfo; } else { echo "Message has been sent"; } ?&gt; </code></pre> <p>after running this code i get the error message as: </p> <pre><code>SMTP -&gt; ERROR: Failed to connect to server: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (1546610735)SMTP Connect() failed. Mailer Error: SMTP Connect() failed. </code></pre> <p>please let me know the problem, as i have seen other post...but i did not get any hint</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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