CodeIgniter Forums
Sending Mail - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Sending Mail (/showthread.php?tid=23878)

Pages: 1 2


Sending Mail - El Forum - 10-25-2009

[eluser]Michael Nielsen[/eluser]
[quote author="jephroni" date="1256468672"]Hi,

Don't know how helpful this will be but the fsockopen error may be an indication that you are running this on windows. fsockopen is broken in windows. Not sure how to fix it but maybe it's a direction worth exploring.

jephroni[/quote]

yea im running it on windows. Would you know how to get around this???


Sending Mail - El Forum - 10-25-2009

[eluser]BrianDHall[/eluser]
[quote author="Michael Nielsen" date="1256474198"][quote author="jephroni" date="1256468672"]Hi,

Don't know how helpful this will be but the fsockopen error may be an indication that you are running this on windows. fsockopen is broken in windows. Not sure how to fix it but maybe it's a direction worth exploring.

jephroni[/quote]

yea im running it on windows. Would you know how to get around this???[/quote]

Is this is a live server or a localhost testing/development environment?

Most WAMP stacks are not ready to support SSL transactions of any kind. Check on XAMPP, as out of the box they have it setup to work with SSL.

I have found that simply enabling the SSL extension on platforms I've worked on was insufficient to get things working, as there are public key/private key generation issues that I've never wanted to mess with.


Sending Mail - El Forum - 11-21-2009

[eluser]Unknown[/eluser]
I had problems with this initially and got around it by loading the parameters into an array, then initialising the library using the array.
Just Try This
Code:
$config = Array(
    'protocol' => 'smtp',
    'smtp_host' => 'ssl://smtp.googlemail.com',
    'smtp_port' => 465,
    'smtp_user' => 'xxx',
    'smtp_pass' => 'xxx',
    'mailtype'  => 'html',
    'charset'   => 'iso-8859-1'
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");

// Set to, from, message, etc.
        
$result = $this->email->send();

I Found The Answer Here

Solution