// Pour serveur local (Option 1) $mail->isSMTP(); $mail->Host = 'localhost'; // ou '127.0.0.1' $mail->SMTPAuth = true; $mail->Username = 'user@vmi2854090.contaboserver.net'; $mail->Password = 'votre_mot_de_passe'; $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = 587; // OU pour service externe (Option 2 - exemple SendGrid) $mail->isSMTP(); $mail->Host = 'smtp.sendgrid.net'; $mail->SMTPAuth = true; $mail->Username = 'apikey'; $mail->Password = 'votre_cle_api'; $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = 587;