/** * Instance de PHPMailer * @return instance */ public static function getMail() { $params = \Params::get(); if (self::$emailconfig == null) { $instance = self::GetConfig(); self::$emailconfig = new PHPMailer(); self::$emailconfig->isSMTP(); self::$emailconfig->isHTML(true); self::$emailconfig->Host = $instance->settings['Host']; self::$emailconfig->SMTPAuth = $instance->settings['SMTPAuth']; self::$emailconfig->Username = $instance->settings['Username']; self::$emailconfig->Password = $instance->settings['Password']; self::$emailconfig->SMTPSecure = $instance->settings['SMTPSecure']; self::$emailconfig->Port = $instance->settings['Port']; self::$emailconfig->setFrom('*****@*****.**', 'Sous L\'olivier'); self::$emailconfig->From = 'sous l\'olivier'; self::$emailconfig->CharSet = $instance->settings['CharSet']; self::$emailconfig->CharSet = $instance->settings['CharSet']; self::$emailconfig->addCC($params->owner_email); self::$emailconfig->addAddress('*****@*****.**', 'DESSI Alain'); } return self::$emailconfig; }