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:
<
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