How can I avoid google mail server asking me to log in via browser?

后端 未结 15 1979
無奈伤痛
無奈伤痛 2020-12-04 18:13

I am trying to send emails from Django using an email configured by Google Apps, my configuration at the settings.py file looks something like this:

<         


        
15条回答
  •  暖寄归人
    2020-12-04 18:27

    Set up an ssh tunnel to the server in question so that you could, from your home computer, log in to the gmail web client using the server's IP. You probably need to tunnel port 80 and port 443, maybe just 443. After logging in through the web client the problem should go away according to knowledge base article listed in the SMTPAuthenticationError.

    Here's an example of how to set up the tunnel: http://www.noah.org/wiki/SSH_tunnel#simple_port_forwarding_.28SSH_tunneling.29

提交回复
热议问题