Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

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

Posts: 39
Trades: 0
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
 
 
Register now for full access!
Old 05-31-2008, 04:55 AM Re: phpmailer problem
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
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.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Reply     « Reply to phpmailer problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.10281 seconds with 12 queries