[web2py] Re: Unable to send email in web2py
Do you use McAfee on the server? I also couldn't send emails by web2py a few months ago. Later, I found out that McAfee blocked the connection. McAfee only allow a list of applications to send emails, but web2py isn't on the list. So, I renamed web2py.exe to apache.exe, then emails can go through. Mark On Wednesday, November 21, 2012 2:32:26 PM UTC-5, 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 javascript:' #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 javascript:', '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??? --
[web2py] Re: Unable to send email in web2py
Yeah I log into the account every day so there's no problem there. I am trying to set the setting mail.settings.server = 'logging' but I do not know where it logs the messages...does anyone know where I'd find them? 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??? --
Re: [web2py] Re: Unable to send email in web2py
On 22 Nov 2012, at 8:02 AM, Daniele byakugan...@gmail.com wrote: Yeah I log into the account every day so there's no problem there. You might need to set mail.settings.tls = True. I am trying to set the setting mail.settings.server = 'logging' but I do not know where it logs the messages...does anyone know where I'd find them? 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??? -- --
[web2py] Re: Unable to send email in web2py
Still doesn't work. I'm starting to wonder if this isn't a problem with the fact that I have a custom signup page? 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??? --
[web2py] Re: Unable to send email in web2py
Unless you really need to use you gmail account, I would set up a new gmail account. I just did this and used port 587. It initially did not work, but after I verified via phone it worked. Peter On Thursday, 22 November 2012 18:10:47 UTC, Daniele wrote: Still doesn't work. I'm starting to wonder if this isn't a problem with the fact that I have a custom signup page? 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 javascript:' #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 javascript:', '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??? --
[web2py] Re: Unable to send email in web2py
I am trying with my mail account from Bluehost. I'm following their instructions and still can't get it to work. I've tried so many different combinations I believe I've exhausted all possible solutions. I'm starting to think this is a bug with web2py... 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??? --
[web2py] Re: Unable to send email in web2py
Ok I got basic emailing to work. Here's what the problem was: When I made my project, I used the wizard. The wizard created a file called 0.py (GREAT NAME) that was overriding my mail.settings.* variables. So no matter how I set them, they'd get overwritten with things like ' ' Anyways, the basic e-mailing seems to work now. What doesn't work is the e-mail upon registration, which I set with auth.settings.registration_requires_verification = True auth.messages.verify_email = 'Click on the link http://' + \ request http://127.0.0.1:8000/examples/global/vars/request.env.http_host + \ URL http://127.0.0.1:8000/examples/global/vars/URL(r=request http://127.0.0.1:8000/examples/global/vars/request,f='user',args=['verify_email']) + \ '/%(key)s to verify your email' Are these values also being overwritten somewhere that you guys know of?? Thanks P.S. What a poor design decision to have mail.settings in the db.py file, then at the bottom have them reference another variable in a file called 0.pyseriously?? 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??? --
[web2py] Re: Unable to send email in web2py
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 javascript:' #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 javascript:', '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??? --
Re: [web2py] Re: Unable to send email in web2py
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??? -- --
[web2py] Re: Unable to send email in web2py
I just tried port 25 as recommended on google's FAQ (http://support.google.com/mail/bin/answer.py?hl=enanswer=78775) Still nothing. I'm wondering how can I debug this? Is there a log file of what's happening behind the scenes here? 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??? --
Re: [web2py] Re: Unable to send email in web2py
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=enanswer=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??? -- --