Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]phpmailer wyswietla bledy
Forum PHP.pl > Forum > Przedszkole
xxdrago
Witam, mam taki prosty skrypt:
  1. require("phpmailer/phpmailer.inc.php");
  2. require("phpmailer/smtp.inc.php");
  3.  
  4.  
  5. // Instantiate your new class
  6. $mail = new phpmailer;
  7.  
  8. // Now you only need to add the necessary stuff
  9. $mail->AddAddress("moje-mail@...", "Josh Adams");
  10. $mail->Subject = "Here is the subject";
  11. $mail->Body = "This is the message body";
  12. $mail->Send(); // send message
  13.  
  14. echo "Message was sent successfully";


Po wykonaniu:

Kod
( ! ) Notice: Undefined variable: from in C:\wamp\www\rejestracja\phpmailer\phpmailer.inc.php on line 259
Call Stack
#    Time    Memory    Function    Location
1    0.0031    142832    {main}( )    ..\test_rejestracja.php:0
2    0.0080    169232    rejestracja( )    ..\test_rejestracja.php:3
3    0.0572    338352    phpmailer->Send( )    ..\rejestracja.php:126
4    0.0572    338464    phpmailer->create_header( )    ..\phpmailer.inc.php:125

( ! ) Notice: Undefined variable: Encoding in C:\wamp\www\rejestracja\phpmailer\phpmailer.inc.php on line 271
Call Stack
#    Time    Memory    Function    Location
1    0.0031    142832    {main}( )    ..\test_rejestracja.php:0
2    0.0080    169232    rejestracja( )    ..\test_rejestracja.php:3
3    0.0572    338352    phpmailer->Send( )    ..\rejestracja.php:126
4    0.0572    338464    phpmailer->create_header( )    ..\phpmailer.inc.php:125

( ! ) Fatal error: Cannot access empty property in C:\wamp\www\rejestracja\phpmailer\phpmailer.inc.php on line 271
Call Stack
#    Time    Memory    Function    Location
1    0.0031    142832    {main}( )    ..\test_rejestracja.php:0
2    0.0080    169232    rejestracja( )    ..\test_rejestracja.php:3
3    0.0572    338352    phpmailer->Send( )    ..\rejestracja.php:126
4    0.0572    338464    phpmailer->create_header( )    ..\phpmailer.inc.php:125


i za cholere nie wiem co w takim skrypcie moze być źle...

Złego php mailera pobrałem...
nospor
Nie określiłeś takich zmiennych jak From czy Encoding i phpmailer daje ci to delikatnie do zrozumienia.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.