• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1019
  • Last Modified:

phpmailer error

Hi

I'
m getting the following error when trying to send an email with phpmailer

Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/aigf002/libs/class.smtp.php on line 105

Warning: fsockopen(): unable to connect to smtp.aigf.org:25 in /home/aigf002/libs/class.smtp.php on line 105
Message was not sent

I can tell you that it was working when I had the smtp turned off, The smtp class is in the include directory, but im not sure if they smtp information is correct. (eg username/password/server) could this error be produced because i have the config info wrong... or is it something else?

Thanks
Ant
0
antum
Asked:
antum
  • 2
1 Solution
 
ixtiCommented:
This can be. Check username/password/server.
And please, show me line 105 from your /home/aigf002/libs/class.smtp.php
0
 
str_kaniCommented:
you can have the servername as localhost if you donot know the smtp server name...

for the username and password use the one provided for authentication. or you can use the POP email account and password i think....
0
 
antumAuthor Commented:
Hi,

Set the server to localhost and tried the main login and password for the account but now I get this error message

Message was not sent

Mailer Error: Language string failed to load: recipients_failedant@vicrou.net

0
 
ixtiCommented:
The same bug was discussed on SourceForge's phpmailer project page ( http://sourceforge.net/mailarchive/forum.php?forum_id=1709&max_rows=25&style=nested&viewmonth=200310 ). There you'll find the solution (hope it help you):
<?php
ini_set("SMTP","smtp.example.com");
ini_set("sendmail_from","postmaster@example.com");
$mail->Host     = "smtp.example.com";
$mail->Mailer   = "smtp";
?>

Also there is a discussion on similar phpmailer error here ( http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_21451918.html ) But the problem in that post was in configuration under Win32. But there was a lot of versions of how to fix problem, maybe something from that discussion will help you.

And there are described another similar problem on SitePoint ( http://www.sitepoint.com/forums/showthread.php?t=350401 ). Maybe this can help too.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now