<commit_before><?php

namespace luya\components;

class Mail extends \yii\base\Component
{
    private $_phpmailer = null;

    public $from = '<EMAIL>';
    
    public $fromName = '<EMAIL>';
    
    public $host = 'mail.zephir.ch';

    public $username = '<EMAIL>';

    public $password = <PASSWORD>; // insert password

    public $isSMTP = true;

    public $altBody = 'Please use a HTML compatible E-Mail-Client to read this E-Mail.';
    
    public $port = '587';
    
    public function create()
    {
        $this->_phpmailer = new \PHPMailer();
        $this->_phpmailer->do_debug = 0;
        if ($this->isSMTP) {
            $this->_phpmailer->SMTPDebug = false;
            $this->_phpmailer->isSMTP();
            $this->_phpmailer->SMTPSecure = 'tls';
            $this->_phpmailer->Host = $this->host;
            $this->_phpmailer->SMTPAuth = true;
            $this->_phpmailer->Username = $this->username;
            $this->_phpmailer->Password = $<PASSWORD>;
            $this->_phpmailer->Port = $this->port;
            $this->_phpmailer->SMTPOptions = array(
                'ssl' => array(
                    'verify_peer' => false,
                    'verify_peer_name' => false,
                    'allow_self_signed' => true
                )
            );
        }
        $this->_phpmailer->From = $this->from;
        $this->_phpmailer->FromName = $this->fromName;
        $this->_phpmailer->isHTML(true);
        $this->_phpmailer->AltBody = $this->altBody;
    }

    public function compose($subject, $body)
    {
        $this->cleanup();
        $this->create();
        $this->_phpmailer->Subject = $subject;
        $this->_phpmailer->Body = $body;
        return $this;
    }<commit_msg>mail component added default charset utf-8<commit_after><?php

namespace luya\components;

class Mail extends \yii\base\Component
{
    private $_phpmailer = null;

    public $from = '<EMAIL>';
    
    public $fromName = '<EMAIL>';
    
    public $host = 'mail.zephir.ch';

    public $username = '<EMAIL>';

    public $password = <PASSWORD>; // insert password

    public $isSMTP = true;

    public $altBody = 'Please use a HTML compatible E-Mail-Client to read this E-Mail.';
    
    public $port = '587';
    
    public function create()
    {
        $this->_phpmailer = new \PHPMailer();
        $this->_phpmailer->do_debug = 0;
        $this->_phpmailer->CharSet = 'UTF-8';
        if ($this->isSMTP) {
            $this->_phpmailer->SMTPDebug = false;
            $this->_phpmailer->isSMTP();
            $this->_phpmailer->SMTPSecure = 'tls';
            $this->_phpmailer->Host = $this->host;
            $this->_phpmailer->SMTPAuth = true;
            $this->_phpmailer->Username = $this->username;
            $this->_phpmailer->Password = $<PASSWORD>;
            $this->_phpmailer->Port = $this->port;
            $this->_phpmailer->SMTPOptions = array(
                'ssl' => array(
                    'verify_peer' => false,
                    'verify_peer_name' => false,
                    'allow_self_signed' => true
                )
            );
        }
        $this->_phpmailer->From = $this->from;
        $this->_phpmailer->FromName = $this->fromName;
        $this->_phpmailer->isHTML(true);
        $this->_phpmailer->AltBody = $this->altBody;
    }

    public function compose($subject, $body)
    {
        $this->cleanup();
        $this->create();
        $this->_phpmailer->Subject = $subject;
        $this->_phpmailer->Body = $body;
        return $this;
    }
{'fraction_non_alphanumeric': 0.15365097265294614, 'fraction_numerical': 0.00281928390188892, 'mean_word_length': 1.9298100743187447, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 107, 'https://': 0, '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': '2848027', 'n_tokens_mistral': 1114, 'n_tokens_neox': 1128, 'n_words': 205}