Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function index(){
- $config=array(
- 'protocol' => 'smtp',
- 'smtp_host' => 'ssl://smtp.googlemail.com',
- 'smtp_port' => 587,
- 'smtp_user' => 'aziz.10786@gmail.com',
- 'smtp_pass' => 'password',
- 'mailtype' => 'html',
- 'charset' => 'iso-8859-1'
- );
- $this->load->library('email', $config);
- $this->email->set_newline("rn");
- //send mail
- $this->email->from('aziz.10786@gmail.com','aziz');
- $this->email->to('aziz.10786@gmail.com');
- $this->email->subject('testing mail');
- $this->email->message('successfully working');
- if($this->email->send()){
- echo 'your email sent';
- }
- else{
- show_error($this->email->print_debugger());
- }
- }
- }
- SMTP = smtp.gmail.com
- smtp_port = 587
- sendmail_from = aziz.10786@gmail.com
- sendmail_path ="C:sendmailsendmail.exe -t"
- smtp_server=smtp.gmail.com
- smtp_port=587
- error_logfile=error.log
- debug_logfile=debug.log
- auth_username=aziz.10786@gmail.com
- auth_password=here is my gmail password
- force_sender=aziz.10786@gmail.com
- A PHP Error was encountered
- Severity: Warning
- Message: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
- Filename: libraries/Email.php
- Line Number: 1554
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement