I'm an application developer and have little knowledge on sysadmin / server configuration tasks.
I have an nginx server communicating to a Flask web application through uWSGI on a VPS. I'm trying to connect to Google SMTP to send mail to my registered users. The Python code all works on my localhost, but I have no idea how to configure nginx to communicate with Google SMTP.
After some research, I have come across the nginx_mail_core module, and some 'mail' blocks in the nginx config - but most of it is rather foreign. If it is indeed a mail block I need to configure, an example would be much appreciated.
Here's my current nginx configuration file:
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;
}
}
}
Thanks in advance!