Jump to content

phpmailer problem


aslanandbeez

Recommended Posts

I've tried to run a test page in phpmailer, I have entered the SMTP address but get this error address;

 

 

Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/jbaker/public_html/class.smtp.php on line 105

 

Warning: fsockopen() [function.fsockopen]: unable to connect to mail.jonathonbaker.exofire.net :25 (Unknown error) in /home/jbaker/public_html/class.smtp.php on line 105

Message was not sent.Mailer error: Language string failed to load: connect_host

 

here's the test page;

 

<?php

require("class.phpmailer.php");

$mail = new PHPMailer();

$mail->IsSMTP(); // telling the class to use SMTP

$mail->Host = "mail.jonathonbaker.exofire.net "; // SMTP server

$mail->From = "[email protected]";

$mail->AddAddress("[email protected]");

 

$mail->Subject = "First PHPMailer Message";

$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";

$mail->WordWrap = 50;

 

if(!$mail->Send())

{

echo 'Message was not sent.';

echo 'Mailer error: ' . $mail->ErrorInfo;

}

else

{

echo 'Message has been sent.';

}

?>

 

what is it I am doing wrong? Do you need the files class.phpmailer.php and class.smtp.php

Link to comment
https://forums.phpfreaks.com/topic/108067-phpmailer-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.