CodeIgniter Forums
Can't get activation email to work with Ion Auth... - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Can't get activation email to work with Ion Auth... (/showthread.php?tid=59378)



Can't get activation email to work with Ion Auth... - El Forum - 09-27-2013

[eluser]Unknown[/eluser]
I've nearly finished with a website, I just need to get authentication stuff up and running but I am facing a problem. I've got root/application/config/ion_auth.php necessary parts sset up:

Code:
$config['email_activation']           = TRUE;
$config['use_ci_email'] = TRUE;

And as per Codeiginter documentation I've created root/application/config/email.php with the following contents:

Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/*
| -------------------------------------------------------------------------
| Email
| -------------------------------------------------------------------------
| This file lets you define parameters for sending emails.
| Please see the user guide for info:
|
| http://ellislab.com/codeigniter/user-guide/libraries/email.html
|
*/
$config['protocol']='smtp';
$config['smtp_host']='ssl://smtp.gmail.com.'; //(SMTP server)
$config['smtp_port']='465'; //(SMTP port)
$config['smtp_timeout']='30';
$config['smtp_user']='[email protected]'; //([email protected])
$config['smtp_pass']='password'; // (gmail password)
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$config['newline'] = "\r\n";


/* End of file email.php */
/* Location: ./application/config/email.php */

However when I try and sign up I get the form error:

Unable to Send Activation Email

And about a dozen of the following errors:

Code:
A PHP Error was encountered

Severity: Warning

Message: fwrite() expects parameter 1 to be resource, boolean given

Filename: libraries/Email.php

Line Number: 1846

I'm pretty sure this is because I haven't got SSL on my server, and gmail requires SSL to work (I've tried without the ssl://) but I just want to be sure before I go ahead getting a dedicated IP and buying an SSL cert that no one else has had this problem. It would also be great to have a way to test sign up functionality without having to go through the bother of setting up SSL, are there any email clients that I can test without SSL?

Thanks all! Smile


Can't get activation email to work with Ion Auth... - El Forum - 09-28-2013

[eluser]CroNiX[/eluser]
I'd just make a self signed cert for testing before going that route.

I hope that isn't your real email/password in your posted code.


Can't get activation email to work with Ion Auth... - El Forum - 09-28-2013

[eluser]Unknown[/eluser]
[quote author="CroNiX" date="1380400376"]I'd just make a self signed cert for testing before going that route.

I hope that isn't your real email/password in your posted code.[/quote]

Oh my goodness. That might've been the most stupid thing I've ever done. I am amazed with myself. Incredible what a long day and an eagerness to go home will do to you. Thank you for pointing it out. Luckily no one logged in.


Wow.