and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
My particulars:
LocalTest Machine:
Win XP Pro, Apache 1.3.31, PHP 4.3.11, SwiftMailer 3.1.3-php4
Extracted the contents to c:\website\SwiftMailer
Edit PHP.ini file to set the include_path to c:\website\SwiftMailer\lib
Problem: Trying to setup a test machine within my company to test e-mails for a website to send out e-mails. I would like to test the setup using a personal account from yahoo.
My basic testemail.php code:
ini_set('display_errors', '1');
error_reporting(E_ALL);
require_once ("Swift.php");
require_once ("Swift/Connection/SMTP.php");
//Start Swift
$smtp =& new Swift_Connection_SMTP("smtp.mail.yahoo.com");
$smtp->setUsername("changeToUser");
$smtp->setPassword("changeToPassword");
$swift =& new Swift($smtp);
//Create the message
$message =& new Swift_Message("My subject", "My body");
//Now check if Swift actually sends it
if ($swift->send($message, "im_chaz@rocketmail.com", "cbernardes@gvnw.com")) echo "Sent";
else echo "Failed";
Fatal error:
Uncaught Error of type [swift_badresponseexception] with message [Expected response code(s) [250] but got response [535 authorization failed (#5.7.0)]]
@0 swift::swift() in c:\website\testemail.php on line 17
@1 swift::connect() in c:\website\SwiftMailer\lib\Swift.php on line 109
@2 swift::handshake() in c:\website\SwiftMailer\lib\Swift.php on line 243
@3 swift_connection_smtp::postconnect() in c:\website\SwiftMailer\lib\Swift.php on line 297
@4 swift_connection_smtp::runauthenticators() in c:\website\SwiftMailer\lib\Swift\Connection\SMTP.php on line 340
in c:\website\SwiftMailer\lib\Swift\Errors.php on line 99
I am totally new at this and would love any assistance. I have tried going through most of the messages but I am at a lost. I appreciate any feedback.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Last edited by chazter6 on Thu Apr 12, 2007 3:00 pm, edited 1 time in total.
Fatal error:
Uncaught Error of type [swift_connection_exception] with message [The SMTP connection failed to start [tls://smtp.mail.yahoo.com:465]: fsockopen returned Error Number 0 and Error String 'The operation completed successfully. ']
@0 swift::swift() in c:\website\testemail.php on line 20
@1 swift::connect() in c:\website\SwiftMailer\lib\Swift.php on line 109
in c:\website\SwiftMailer\lib\Swift\Errors.php on line 99
Am I making progress? Or is it getting worse and I should revert to my previous code?
This was solved via PM. Yahoo does not provide message relaying just because you have a Yahoo email account; their MX server is just for receiving mail to Yahoo accounts.