<commit_before><?php
class Mailer extends CI_Controller{
    function __construct(){
        parent::__construct();
    }
    function sendmail(){
        $this->load->library('email');
        //$this->config->load('padimail');
        $config['protocol'] = 'sendmail';
        $config['mailpath'] = '/usr/sbin/sendmail';
        $config['charset'] = 'iso-8859-1';
        $config['wordwrap'] = false;
        
        $this->email->initialize($config);
        $this->email->from('<EMAIL>');
        $this->email->to('<EMAIL>');
        $this->email->subject('Test Email');
        $this->email->message($this->welcomeusertemplate('Puji','<EMAIL>','test'));
    }
    function welcomeusertemplate($username,$email,$password){
        $txt = 'Halo ' . $username . ' ' . PHP_EOL;
        $txt.= 'Berikut akun anda di PadiApp ' . PHP_EOL;
        $txt.= PHP_EOL;
        $txt.= 'login : ' . $email . ' ' . PHP_EOL;
        $txt.= 'password : ' . $password . ' ' . PHP_EOL;
        $txt.= 'tautan aplikasi https://database.padinet.com ' . PHP_EOL;
        $txt.= PHP_EOL;
        $txt.= 'terimakasih';
        $txt.= PHP_EOL;
        $txt.= PHP_EOL;
        $txt.= 'Admin PadiApp';
        $txt.= PHP_EOL;
        return $txt;        <commit_msg>add setting for email<commit_after><?php
class Mailer extends CI_Controller{
    function __construct(){
        parent::__construct();
    }
    function index(){
        echo 'this is index';
    }
    function sendmail(){
        $this->load->library('email');
        //$this->config->load('padimail');
        //$config['protocol'] = 'sendmail';
        //$config['mailpath'] = '/usr/sbin/sendmail';
        //$config['charset'] = 'iso-8859-1';
        //$config['wordwrap'] = false;
        


        $config['protocol']    = 'smtp';
        $config['smtp_host']    = 'ssl://smtp.gmail.com';
        $config['smtp_port']    = '465';
        $config['smtp_timeout'] = '7';
        $config['smtp_user']    = '<EMAIL>';
        $config['smtp_pass']    = '******';
        $config['charset']    = 'utf-8';
        $config['newline']    = "\r\n";
        $config['mailtype'] = 'text'; // or html
        $config['validation'] = TRUE; // bool whether to validate email or not      



        $this->email->initialize($config);
        $this->email->from('<EMAIL>');
        $this->email->to('<EMAIL>');
        $this->email->subject('Test Email');
        print_r($this->email->message($this->welcomeusertemplate('Puji','<EMAIL>','test')));
    }
    function welcomeusertemplate($username,$email,$password){
        $txt = 'Halo ' . $username . ' ' . PHP_EOL;
        $txt.= 'Berikut akun anda di PadiApp ' . PHP_EOL;
        $txt.= PHP_EOL;
        $txt.= 'login : ' . $email . ' ' . PHP_EOL;
        $txt.= 'password : ' . $password . ' ' . PHP_EOL;
        $txt.= 'tautan aplikasi https://database.padinet.com ' . PHP_EOL;
        $txt.= PHP_EOL;
        $txt.= 'terimakasih';
        $txt.= PHP_EOL;
        $txt.= PHP_EOL;
        $txt.= 'Admin PadiApp';
        $txt.= PHP_EOL;
        return $txt;        
{'fraction_non_alphanumeric': 0.2003922850604773, 'fraction_numerical': 0.0049035632559660015, 'mean_word_length': 2.1644260599793177, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 40, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2344266', 'n_tokens_mistral': 1057, 'n_tokens_neox': 1013, 'n_words': 175}