On 21 Nov 2012, at 4:49 PM, Daniele <byakugan...@gmail.com> wrote: > I just tried port 25 as recommended on google's FAQ > (http://support.google.com/mail/bin/answer.py?hl=en&answer=78775) > Still nothing. I'm wondering how can I debug this? Is there a log file of > what's happening behind the scenes here?
Double-check that you can log in to gmail with the credentials you're providing. If you're using two-factor authentication, you'll need to generate an app-specific password, I think. I set this up successfully a while ago, but I abandoned it because I very quickly ran into Gmail's limit on the number of messages that can be sent in a day. It's surprisingly low. > > On Wednesday, November 21, 2012 7:32:26 PM UTC, 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??? > > -- > > > --