Configuration Error
Posted: Sun Nov 04, 2007 11:15 pm
I uploaded the lib folder as-is, in an accessible folder for the file to access the required files. I tried to send a simple email:
And I receive:
in C:\Domains\epbor.com\wwwroot\membersonly\lib\Swift\Errors.php on line 99
My web host provides SMTP Server (with authentication). Any help is greatly appreciated for this php newbie.
Code: Select all
<?php
//Load in the files we'll need
require_once "lib/Swift.php";
require_once "lib/Swift/Connection/SMTP.php";
//Start Swift
$swift =& new Swift(new Swift_Connection_SMTP("smtp.your-host.tld"));
//Create the message
$message =& new Swift_Message("My subject", "My body");
//Now check if Swift actually sends it
if ($swift->send($message, "apryle@allyourssolutions.com", "climberapryle@yahoo.com")) echo "Sent";
else echo "Failed";
?>Code: Select all
Fatal error:
Uncaught Error of type [swift_connectionexception] with message [The SMTP connection failed to start [smtp.your-host.tld:25]: fsockopen returned Error Number 0 and Error String 'The operation completed successfully. ']
@0 swift::swift() in C:\Domains\epbor.com\wwwroot\membersonly\processemailer.php on line 8
@1 swift::connect() in C:\Domains\epbor.com\wwwroot\membersonly\lib\Swift.php on line 109My web host provides SMTP Server (with authentication). Any help is greatly appreciated for this php newbie.