Sending email from Django Mezzanine running on Her

2019-07-16 04:17发布

I am using rackspace email and having problem sending email via Mezzanine(1.4.10) form page. This is my settings:

EMAIL_HOST = 'secure.emailsrvr.com'
EMAIL_PORT = 465    # other ports also tried
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'info@example.com'
EMAIL_HOST_PASSWORD = 'secret'

This is Rackspace documentation: http://www.rackspace.com/apps/support/portal/1088

But I can send email from the console like this:

from django.core.mail import send_mail

send_mail('Subject here', 'Here is the message.', 'from@example.com',
    ['to@example.com'], fail_silently=False)

It return 1 and I actually got the email. If I do that from Mezzanine, I assumed it also return 1 according the redirect URL after the email was sent, but I don't get the email.

1条回答
一夜七次
2楼-- · 2019-07-16 05:09

In addition to the settings mentioned in the Django documentation, try setting DEFAULT_FROM_EMAIL. You will probably want to use the same value as EMAIL_HOST_USER.

查看更多
登录 后发表回答