private static function mailjetMail($reply, $to, $objet, $content, $attachments) { require_once ROOT . 'phpmailer/class.phpmailer.php'; $mail = new PHPmailer(); $mail->CharSet = CHARSET; $mail->IsSMTP(); $mail->Host = "in.mailjet.com"; $mail->SMTPAuth = true; // Si votre serveur requiert une authentification. $mail->SMTPSecure = 'ssl'; $mail->Port = 25; $mail->Username = "******"; $mail->Password = "******"; $mail->IsHTML(true); $mail->From = $reply; $mail->FromName = 'Route des Vins de bordeaux, graves et sauternes'; $mail->AddAddress($to); // recepteur $mail->AddReplyTo($reply); $mail->Subject = $objet; $mail->Body = $content; foreach ($attachments as $cid => $attachment) { $mail->AddEmbeddedImage($attachment['file'], $cid, $attachment['name']); } if (!$mail->Send()) { print_r($mail->ErrorInfo); } }