Set up our live email server in Sendgrid


#1

Hi I tried to set live mail server in Sendgrid but failed. First I tried by adding following code to settings.py:

EMAIL_HOST = 'smtp.sendgrid.net'
EMAIL_HOST_USER = 'sendgrid_username'
EMAIL_HOST_PASSWORD = 'sendgrid_password'
EMAIL_PORT = 587
EMAIL_USE_TLS = True

With replacing sedgrid_username and password and git push heroku master. But no confirmation mail come to sendgrid as well as my email when I register as new user.

I also tried to installing Sendgrid by pip install sendgrid
and adding it to

INSTALLED_APPS = (
        # Existing apps
        "sendgrid",
)

and add settings.py:

SENDGRID_EMAIL_HOST = "smtp.sendgrid.net"
SENDGRID_EMAIL_PORT = 587
SENDGRID_EMAIL_USERNAME = "your_sendgrid_username"
SENDGRID_EMAIL_PASSWORD = "your_sendgrid_password"

In this case, it give ImportError: cannot import name simplejson.

What is actual procedure to set up live mail server?
Could you describe it step by stem?


#2

Before pushing to Heroku, do emails work locally? If not, is there any error message?


#3

After adding sendgrid credential, it not work either locally or remotely. It won’t produce any error messages


#4

So locally, when you add the Sendgrid credentials, it does nothing when you try to send an email… it doesn’t pop up in your console, and doesn’t produce any errors either? Anything else pop up in your console (again, locally)?