Last active
August 29, 2015 14:27
-
-
Save robertopc/d37badd16f7e98e441de to your computer and use it in GitHub Desktop.
Envio de email com Gmail no CodeIgniter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->load->library('email'); | |
$this->email->initialize(array( | |
'protocol' => 'smtp', | |
'smtp_host' => 'ssl://smtp.googlemail.com', | |
'smtp_port' => '465', | |
'smtp_timeout' => '60', | |
'smtp_user' => '{{{email gmail}}}', | |
'smtp_pass' => '{{{senha gmail}}}', | |
'charset' => 'utf-8', | |
'newline' => "\r\n" | |
)); | |
$this->email->from('{{{remetente}}}', '{{{nome remetente}}}'); | |
$this->email->to('{{{destinatario}}}'); | |
$this->email->subject('{{{assunto}}}'); | |
$this->email->message('{{{mensagem}}}'); | |
$this->email->send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment