Page 1 of 1

fsockopen()

Posted: Wed Aug 08, 2007 10:54 am
by aceconcepts
Hi,

I am trying to get PHPMailer working.

The below error occurs:

Code: Select all

Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.easynet.co.uk:25 in /home/q2q/public_html/phpmailer/class.smtp.php on line 105
Message was not sent.Mailer error: SMTP Error: Could not connect to SMTP host.
When I run the following script:

Code: Select all

<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.easynet.co.uk"; // SMTP server
$mail->From = "me@mydomain.co.uk";
$mail->AddAddress("myfriend@domain.co.uk");

$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.';
}
?>
Any idea how I can resolve this error?

Posted: Wed Aug 08, 2007 11:19 am
by thiscatis
There is a special swiftmailer subforum on this board.
I think you'll get more help there!