[sllug-members]: Google Applications SMTP and PHP

Michael Heath mike.thomas.heath at gmail.com
Mon Nov 12 18:48:53 MST 2007


The first thing I notice is that, while I'm not familiar with Swift,
it doesn't seem like you've taken into account that Google SMTP access
requires STARTTLS/SSL access for SMTP. Thats a start - though, it
doesn't really explain why the connection would be dropping dead with
nothing sent, as STARTTLS comes after EHLO.

I'd be really curious on how you get this to work. I hope my random
comments might help some.

Mike Heath

On Nov 12, 2007 6:08 PM, James Noble <noblejames at gmail.com> wrote:
> 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.
> ______________________________________________________________________
> See http://www.sllug.org/ for latest SLLUG news, information, links.
> Join SLLUG and other UT LUG members on irc.FreeNode.net channel #Utah
> sllug-members at sllug.org
> http://www.sllug.org/cgi-bin/mailman/listinfo/sllug-members
>


More information about the sllug-members mailing list