开发者

Web2py - Using a Gmail address

开发者 https://www.devze.com 2023-03-09 15:25 出处:网络
I am beginner with web2py. I have just created a new project. I want to use a gmail address, let\'s say g@gmail.com. What do I need to modify ?

I am beginner with web2py. I have just created a new project.

I want to use a gmail address, let's say g@gmail.com. What do I need to modify ?

mail.se开发者_Go百科ttings.server = 'logging' or 'smtp.gmail.com:587'  # your SMTP server
mail.settings.sender = 'g@gmail.com'         # your email
mail.settings.login = 'g@gmail.com:mypassword'      # your credentials or None

Is this OK ? What is the purpose of 'logging' ?


Should be

mail.settings.server = 'smtp.gmail.com:587' 

Setting mail.settings.server = 'logging' has the effects of logging to console requests for sending emails but does not send the emails. It is useful for debugging email problems.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号