Welcome Guest, Not a member yet? Register   Sign In
Gmail SMTP using SSL/TLS
#21

[eluser]Spicer[/eluser]
This may or may not be the right place to post this. But I will anyway.

I have always thought running your own mail server is a pain, and I always thought using Gmail to send email for your site was only ok for small sites.

I recently discovered this company http://www.sendgrid.com and have been very happy with them so far.
#22

[eluser]BrandonDurham[/eluser]
Thank you SO MUCH for this! Fixed an issue I've been having for months.
#23

[eluser]BrianDHall[/eluser]
Great post/tutorial, thanks for posting it - might come in handy some day Smile
#24

[eluser]husni[/eluser]
good job wrs!!
it works! :-)
#25

[eluser]miss_amylee[/eluser]
hi all,

im using almost similar code but mine is not working.. im testing it on my real server.here is my code:

<?php

class Test2 extends Controller{

function __construct()
{
parent::Controller();
}

function index()
{
$data['pagetitle'] = 'Account Activation';
$email = $this->load->view('test1',$data,TRUE);

$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => 'mypasswordhere',
'mailtype' => 'html',
'wordwrap' => TRUE
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");

$this->email->from('[email protected]', 'farah');
$this->email->to('[email protected]');

$this->email->subject(' Testing testing testing....');
#$this->email->message('Welcome!');
$this->email->message($email);

if (!$this->email->send()):
show_error($this->email->print_debugger());
else:

echo 'Your e-mail has been sent!';
endif;
}
}
?>


i already set my pop3 setting in gmail.but stl got the error.pls someone help me~

fsockopen() [function.fsockopen]: unable to connect to smtp.googlemail.com:465 (Connection timed out)
#26

[eluser]miss_amylee[/eluser]
how to check the openSSL is enabled..
#27

[eluser]Unknown[/eluser]
Thanks a lot!
It's really a very helpful post!
It solves the problem which i'm working on!
Thousand thanks!
#28

[eluser]brettalton[/eluser]
This was very helpful, and much better than replacing the Email.php library with Swiftmailer, thank you!
#29

[eluser]Unknown[/eluser]
Thank you for sharing the codes. I did the same thing and I got some errors, I found in this line, thanks for sharing this correct code.

$this->load->library(‘email’, $config);


Bob M.
#30

[eluser]Unknown[/eluser]
[quote author="miss_amylee" date="1272290048"]how to check the openSSL is enabled..[/quote]
enable SSL in your PHP config. Load up php.ini and find a line with the following:

;extension=php_openssl.dll




Theme © iAndrew 2016 - Forum software by © MyBB