require("phpmailer/phpmailer.inc.php"); require("phpmailer/smtp.inc.php"); // Instantiate your new class $mail = new phpmailer; // Now you only need to add the necessary stuff $mail->AddAddress("moje-mail@...", "Josh Adams"); $mail->Subject = "Here is the subject"; $mail->Body = "This is the message body"; $mail->Send(); // send message
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
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...