tag (smtp)

archive

smtp django settings May
11
1
0

I have to go trolling the internet every time I need to locate the default email variables that I need to set up the SMTP connection the settings file for Django, so I'm throwing them here for reference. Perhaps someone else might also find this useful.

EMAIL_HOST = 'mail.digitaldreamer.net'
EMAIL_HOST_USER = '*****'
EMAIL_HOST_PASSWORD = '******'
EMAIL_PORT = '25'
DEFAULT_FROM_EMAIL = "test@example.com"
SERVER_EMAIL = "test@example.com"

comments

local python mail server patch Mar
31
1
0

Sometimes in development it's handy to run a local smtp mail server. This shell script will dump any smtp requests out to the terminal if you point your application to localhost with the correct port.

#!/usr/bin/env sh

python -m smtpd -n -c DebuggingServer localhost:1025

comments

have your django project use an external SMTP server Mar
22
1
0

Most of the time I want to have my Django project send mail through and an external SMTP server. You can easily set this up by adding the following variables to you settings file.

EMAIL_HOST = 'mail.example.com'
EMAIL_PORT = '25'
EMAIL_HOST_USER = 'test'
EMAIL_HOST_PASSWORD = '******'
DEFAULT_FROM_EMAIL = 'test@example.com'
SERVER_EMAIL = 'test@example.com'

comments