/** * В конструкторе выполним все необходимые подготовки. * Доступ public как в PHPMailer. */ public function __construct() { check_condition(!self::$inst, 'Экземпляр ' . __CLASS__ . ' должен быть единственным'); $this->exceptions = true; $this->CharSet = 'UTF-8'; $this->SetLanguage('ru'); $this->IsSMTP(); $this->SMTPKeepAlive = true; //Need SmtpClose in __destruct() $this->SMTPAuth = true; // Enable SMTP authentication $this->Host = ConfigIni::smtpHost(); // Specify main and backup server $this->Sender = ConfigIni::smtpUser(); $this->Username = ConfigIni::smtpUser(); $this->Password = ConfigIni::smtpPwd(); //Enable encryption, 'ssl' also accepted //$mail->SMTPSecure = 'tls'; $this->IsHTML(true); //$mail->WordWrap = 50; $this->reset(); }