开发者

Web2py - Using a Gmail address

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜