Kod oblsugi mojego formularza:
<?php #filtriowanie #koniec filtrowania require_once('../phpmailer/class.phpmailer.php'); //dodanie klasy phpmailer require_once('../phpmailer/class.smtp.php'); //dodanie klasy smtp $mail = new PHPMailer(); // Next we create a new object of the PHPMailer called $mail $mail->From = $emial; $mail->FromName = $imie." ".$nazwisko; $mail->AddAddress("testowacesprzyk@interia.pl","Jack"); // This is the adress to witch the email has to be send. $mail->Subject = $temat; // This is the subject of the email message. $mail->Body = $tresc; // This is the actual email message if(!$mail->Send()) // Now we send the email and check if it was send or not. { } else { } } ?>
Informacja zwrotna:
Message was not sent.Mailer error: Could not instantiate mail function.
Zawartosc zmiennych:
string 'Jan Kowalski' (length=12) string 'email@gmail.com' (length=15) string 'suggestions' (length=11) string 'jakas tresc' (length=11)
-funkcja mail jest napewno
-w innej wersji skrypt dzialal
-wykonywane na localhost