如何configurationNginx与SMTP服务器通信?

我是一名应用程序开发人员,对系统pipe理员/服务器configuration任务知之甚less。

我有一个nginx服务器通过VPS上的uWSGI与Flask Web应用程序通信。 我正在尝试连接到Google SMTP以将邮件发送给我的注册用户。 Python代码都在我的本地主机上工作,但我不知道如何configurationnginx与Google SMTP进行通信。

经过一番研究,我已经遇到了nginx_mail_core模块,并且在nginxconfiguration中有一些“邮件”模块 – 但是大部分是相当陌生的。 如果它确实是一个邮件块,我需要configuration,一个例子将不胜感激。

这是我目前的nginxconfiguration文件:

worker_processes 1; events { worker_connections 1024; } http { sendfile on; gzip on; gzip_http_version 1.0; gzip_proxied any; gzip_min_length 500; gzip_disable "MSIE [1-6]\."; gzip_types text/plain text/xml text/css text/comma-separated-values text/javascript application/x-javascript application/atom+xml; upstream uwsgicluster { server 127.0.0.1:8080; } # Configuration for Nginx server { # Running port listen 80; # Settings to by-pass for static files location ^~ /app/static/ { root /home/dane/MyApplication/app/static; } # Proxying connections to application servers location / { include uwsgi_params; uwsgi_pass uwsgicluster; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; } } } 

提前致谢!