PHP, PHPMailer: Kann es nicht bekommen, Beispiel-code für PHPMailer zu arbeiten
Ich versuche, php-mailer arbeiten. Ich erhalte eine Fehlermeldung, aber konnte keine info von google auf.
$mail = new phpmailer;
$mail->IsSMTP(); //set mailer to use SMTP
$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.gmail.com";
$mail->Port = 465;
$mail->From = "[email protected]";
$mail->FromName = "Mailer";
$mail->AddAddress("[email protected]", "User");
//$mail->AddAddress("[email protected]"); //name is optional
$mail->AddReplyTo("[email protected]", "Information");
$mail->WordWrap = 50; //set word wrap
//$mail->AddAttachment("c:\\temp\\js-bak.sql"); //add attachments
//$mail->AddAttachment("c:/temp/11-10-00.zip");
$mail->IsHTML(true); //set email format to HTML
$mail->Subject = "Here is the subject";
$mail->Body = "This is the message body";
$mail->Send(); //send message
Den code oben ist, was ich verwende, aber wenn ich ihn starten will bekomme ich folgende in meinem browser...
Fatal error: Cannot access empty property in /the/full/path/to/phpmailer.inc.php on line 271
Hier ist die Linie bezieht es sich auf...
$header[] = sprintf("Content-Transfer-Encoding: %s\n", $this->$Encoding);
Wenn jemand helfen kann wäre es sehr geschätzt werden! Danke.
- Haben Sie überprüft
$this->Encoding
? Ich glaube nicht, dassEncoding
ist eine variable.
Du musst angemeldet sein, um einen Kommentar abzugeben.
Encoding
ist nicht eine variable:$this->Encoding
Es ist ein Fehler auf der Linie 271 in der Datei phpmailer.inc.php
Ist die Zeile :
Ändern :
Sind Sie sicher, dass Sie wollen
$this->$Encoding
? Ich denke, Sie wollen$this->Encoding
(beachten Sie das fehlen von $ on-Codierung).