Reply
phpmailer problem
Old 05-30-2008, 07:13 PM phpmailer problem
aslanandbeez's Avatar
Average Talker

Posts: 17
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 = "aslanandbeez@yahoo.co.uk";
$mail->AddAddress("aabwebdesign@gmail.com");

$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
__________________
Aslan & Beez Web Design - Today, Tomorrow, Forever
aslanandbeez is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 05-31-2008, 04:55 AM Re: phpmailer problem
rogem002's Avatar
Webmaster Talker

Posts: 569
Name: Mike
Location: United Kingdom
PHP Code:
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host "mail.jonathonbaker.exofire.net"// SMTP server // there was a pace here. it could also be mail.exofire.net
$mail->From "aslanandbeez@yahoo.co.uk";
$mail->AddAddress("aabwebdesign@gmail.com");

$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.';
}
?>
there was a space in your host string.
__________________
Website Services
PHP Code:
if(Added_Talkupation($post) == TRUE){iHug($you);} 
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Reply     « Reply to phpmailer problem
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.31389 seconds with 13 queries