http://www.hellotutorials.com/tutorials.php?id=1
Vytvoril som si subor start.php, jeho obsah je:
Kód:
require("class.phpmailer.php");
$mail = new PHPMailer(); //Create PHPmailer class
$mail->From = "spravnyemail@seznam.cz"; //Sender address
$mail->FromName = "lama "; //The name that you'll see as Sender
$mail->Host = "smtp.seznam.cz"; //Your SMTP mail server
$mail->Mailer = "smtp"; //Protocol to use
$mail->AddAddress("adresaprijemcu@isp.xx"); //The address you are sending mail to
$mail->Subject = "Mail Subject"; //Subject of the mail
$mail->Body = "asddasdasdasasd"; //Body of the message
$mail->SMTPAuth = "true";
$mail->Username = "lspravneprihlmeno";
$mail->Password = "spravneheslo;
if(!$mail->Send()){ //Check for result of sending mail
echo "There was an error sending the message"; //Write an error message if mail isn't sent
exit; //Exit the script without executing the rest of the code
}
A pise mi to chybu:
Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.seznam.cz:25 in /home/primdcom/public_html/phpmailer/phpmailer/class.smtp.php on line 105
There was an error sending the message
Pls help
