i have used 587 successfully in the past.

i noticed that username if not a gmail account is the full email address like:

  b...@foo.com:password

perhaps try that even with the gmail account?

cfh

On 11/21/12 16:43 , Daniele Pestilli wrote:
I tried with port *465* and *587* any other port suggestions?


On Thu, Nov 22, 2012 at 12:35 AM, howesc <how...@umich.edu> wrote:

login to gmail and check out that google is not requiring a verification
(i find that for my unused email aliases that i send from that every few
months google wants me to login for real to keep the account active).

also double check the google docs, i think there is a couple of smtp ports
they use and sometimes switching to the other port makes a difference.

On Wednesday, November 21, 2012 11:32:26 AM UTC-8, Daniele wrote:

I'm trying to send emails upon user registration. This is what I have in
my models file:

mail = auth.settings.mailer
mail.settings.server = 'smtp.gmail.com:587'
mail.settings.sender = 'em...@gmail.com' #There's a proper email here
mail.settings.login = 'username:password' #There's a proper
username/password combination here
auth.settings.registration_**requires_verification = True
auth.messages.verify_email = 'Click on the link http://' +
request.env.http_host + URL(r=request,f='user',args=['**verify_email'])
+ '/%(key)s to verify your email'

mail.settings.server = settings.email_server
mail.settings.sender = settings.email_sender
mail.settings.login = settings.email_login

But every time I register a user with a valid email address, I'm getting
no email.
So I'm trying to do it manually with:

mail.send('em...@gmail.com', 'Message subject', 'Plain text body of the 
message')


But I'm getting an error message in the terminal that says:
WARNING:web2py:Mail.send failure:[Errno 111] Connection refused

How can I fix this???

  --






--



Reply via email to