· 7 years ago · May 05, 2019, 10:38 PM
1<?php
2$config = [
3 'protocol' => 'smtp',
4 'smtp_host' => 'smtp.gmail.com',
5 'smtp_port' => 587, //ssl=>465, tls:587
6 'smtp_user' => '@gmail.com',
7 'smtp_pass' => '',
8 'smtp_crypto' => 'tls', //or ssl
9 'mailtype' => 'html', //or text
10 'charset' => 'utf-8'
11];
12
13$this->load->library('email', $config);
14$this->email->set_newline("\r\n");
15
16$this->email->from('csaba8702@gmail.com', 'Kovacs_Csaba');
17$this->email->to('csaba8702@gmail.com');
18
19$this->email->subject('teszt');
20$this->email->message('teszt mail with TLS');
21
22$this->email->send()); //return bool
23?>