Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $config = [
- 'protocol' => 'smtp',
- 'smtp_host' => 'smtp.gmail.com',
- 'smtp_port' => 587, //ssl=>465, tls:587
- 'smtp_user' => '@gmail.com',
- 'smtp_pass' => '',
- 'smtp_crypto' => 'tls', //or ssl
- 'mailtype' => 'html', //or text
- 'charset' => 'utf-8'
- ];
- $this->load->library('email', $config);
- $this->email->set_newline("\r\n");
- $this->email->from('@', 'name');
- $this->email->to('@');
- $this->email->subject('teszt');
- $this->email->message('teszt mail with TLS');
- $this->email->send()); //return bool
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement