I have a Django application. In my development environment, the app is running on my Mac OSX 10.9.3 laptop. This application needs to send emails. So right now I'm using the following python process to simulate an email server.
python -m smtpd -n -c DebuggingServer localhost:1025
This email server simply prints the email messages out to the stdout and then throws the messages away.
I would like this server to actually send the emails instead of just print them out to stdout. Can someone please advise how to do this?
The
DebuggingServer
just shows the message in stdout: https://docs.python.org/2/library/smtpd.html#debuggingserver-objectsCreate a new debugging server. Arguments are as per SMTPServer. Messages will be discarded, and printed on stdout.
If you want to send e-mails directly to the internet, you have to send it through a configured MTA server, you can configure this in
settings.py
inside Django:You can read more on https://docs.djangoproject.com/en/dev/ref/settings/#email-backend