Page 1 of 1

Configuration Error

Posted: Sun Nov 04, 2007 11:15 pm
by Apryle
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:

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";
?>
And I receive:

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 109
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.

Posted: Mon Nov 05, 2007 9:35 am
by feyd
Did you set the SMTP server to your real SMTP server, not "smtp.your-host.tld"?

Posted: Mon Nov 05, 2007 10:05 am
by Apryle
No. I didn't see that in the Install instructions and could not find the file in which to change anything. Could you tell me which file I need to go into? Thanks.

Posted: Mon Nov 05, 2007 10:21 am
by feyd
It's in the very middle of the code you posted above.