PHPMailer SMTP-Standardkonfiguration

Ich wissen, wie die Verwendung von SMTP mit dem PHPMailer:

$mail             = new PHPMailer();
$mail->IsSMTP(); //telling the class to use SMTP
$mail->SMTPAuth   = true;                  //enable SMTP authentication
$mail->Host       = "mail.yourdomain.com"; //sets the SMTP server
$mail->Username   = "yourname@yourdomain"; //SMTP account username
$mail->Password   = "yourpassword";        //SMTP account password

Und es funktioniert gut. Aber meine Frage ist:

Wie kann ich konfigurieren PHPMailer verwenden Sie diese Einstellungen auf default, so dass ich nicht haben, um geben Sie jedes mal, wenn ich will, um E-mail senden?

  • Wenn es um wordpress die check -> wordpress\wp-includes\class-phpmailer.php Datei
Schreibe einen Kommentar