[sllug-members]: Google Applications SMTP and PHP
James Noble
noblejames at gmail.com
Mon Nov 12 18:08:57 MST 2007
I was wondering if anyone has connected a php page to the google
applications smtp. I have tried to do this for a while but have been
unable to send the email. The error I get is
Uncaught Error of type [swift_connectionexception] with message [There
was a problem reading line 1 of an SMTP response. The response so far
was:
[]. It appears the connection has died without saying goodbye to us!
Too many emails in one go perhaps? (fsockopen: #0) ]
$smtp =& new Swift_Connection_SMTP("smtp.gmail.com", 465);
$smtp->setUsername("my_username at gmail.com");
$smtp->setpassword("my_password");
$swift =& new Swift($smtp);
$message = "test";
if ($swift->send($message, "someone at gmail.com",
"someoneelse at gmail.com")) echo "Sent";
else echo "Failed";
Any help would be appreciated.
More information about the sllug-members
mailing list