in reply to Sending email via Gmail

Without further debugging: When you talk to smtp.gmail.com, don't pretend to be "localhost", i.e. smtp.gmail.com. Use your real hostname. If you don't know it, use DNS to find it, or use your external IP address.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^2: Sending email via Gmail
by Gangabass (Vicar) on Jul 23, 2011 at 11:48 UTC
    You're right, using "localhost" is a bad idea but i'm sure this is not an issue here because same code is working on another machine.