Note that there are some explanatory texts on larger screens.

plurals
  1. POSending an email via gmail using Codeigniter and WAMP
    text
    copied!<pre><code> $config = Array( 'protocol' =&gt; 'smtp', 'smtp_host' =&gt; 'ssl://smtp.googlemail.com', 'smtp_port' =&gt; 465, 'smtp_user' =&gt; 'xxx', 'smtp_pass' =&gt; 'xxx', 'mailtype' =&gt; 'html', 'charset' =&gt; 'iso-8859-1' ); $this-&gt;load-&gt;library('email', $config); $this-&gt;email-&gt;set_newline("\r\n"); $this-&gt;email-&gt;from('me@gmail.com','me'); $this-&gt;email-&gt;to($this-&gt;input-&gt;post('email')); $this-&gt;email-&gt;subject("Confirm your account."); $message = '&lt;p&gt;Thank you for signing up!&lt;/p&gt;'; $message .= '&lt;p&gt;&lt;a href="'; $message .= base_url(); $message .= 'main/register_user'; $message .= $key; $message .= '"&gt;Click here!&lt;/a&gt;to sign up&lt;/p&gt;'; $this-&gt;email-&gt;message($message); </code></pre> <p>I'm following some Codeigniter tutorials from phpacademy on youtube. One of the tutorials has you email a unique key to a user so they can register. I'm attempting to send via a gmail account, using other questions and CI forums I've gotten to the code above, but I get the following errors:</p> <blockquote> <p>Message: fsockopen() [function.fsockopen]: unable to connect to >ssl://smtp.googlemail.com:465 (Unable to find the socket transport "ssl" - did you forget >to enable it when you configured PHP?)</p> <p>Filename: libraries/Email.php</p> </blockquote> <p>--</p> <blockquote> <p>Message: fwrite() expects parameter 1 to be resource, boolean given</p> <p>Filename: libraries/Email.php</p> </blockquote> <p>--</p> <blockquote> <p>Message: fgets() expects parameter 1 to be resource, boolean given</p> <p>Filename: libraries/Email.php</p> </blockquote> <p>I'm lost as to the exact steps I need to take to set this up properly. Also, when I move this from local to an actual webhost will it still properly work with my gmail?</p> <p>Thank you very much.</p>
 

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