Welcome Guest, Not a member yet? Register   Sign In
Gmail SMTP Server?
#1

[eluser]jtmgdevelopment[/eluser]
Hi,

I am trying to set up a local SMTP server using gmail. I have the following config entries in my $/config/email.php
Code:
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'smtp.gmail.com';
$config['smtp_port'] = 465;
$config['smtp_user'] = '[email protected]';
$config['smtp_pass'] = '*********';
$config['mailtype'] = 'html';

$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;
I am using the following info from this page: http://mail.google.com/support/bin/answe...swer=13287

I have set this up on a coldfusion server using the above info with no problem. Can anyone shed any light on this?
Thanks.
#2

[eluser]byde[/eluser]
it require ssl, try $config['smtp_host'] = 'ssl://smtp.gmail.com';
#3

[eluser]jtmgdevelopment[/eluser]
When using "ssl://" the just keeps processing. Here is my actual code for sending the email:
Code:
private function send_verfication_email($member_id, $email)
    {
        $this->load->helper('url');
        $this->load->library('email');        
        
        $data = array(
            'email_id'                 => uniqid(),
            'member_external_key'    => $member_id,
            'created'                 => date('Y\-m\-d')
        );
        
        $verify_link = site_url('verify_email/' . $data['email_id'] . '/' . $data['member_external_key']);

        $email_message =
            '
                <h2>Confirm Email</h2>
                <p>To confirm your email please click the below link</p>
                <p><a href="' . $verify_link . '">Confirm Email</a></p>
            ';
        
        
        $this->db->insert('verify_email', $data);
        
        
        $this->email->clear();
        $this->email->to($email);
        $this->email->from(NOREPLY_EMAIL);
        $this->email->subject('Confirm Email');
        $this->email->message($email_message);
        
        $this->email->send();
          
        if($this->email->send())
        {
            return TRUE;
        }
        
        show_error($this->email->print_debugger());
        
        return FALSE;
            
    }
#4

[eluser]byde[/eluser]
check this out
http://ellislab.com/forums/viewthread/84689/P15/#877506

what i saw is

$config['smtp_host'] = 'smtp.gmail.com'; //your code
but
$config['smtp_host'] = "ssl://smtp.googlemail.com";// on referenced code




Theme © iAndrew 2016 - Forum software by © MyBB