ubernostrum/django-contact-form

Submitted contact form message not delivered

justinmayer opened this issue · 1 comments

My development settings contain the following directive so that email is printed to console instead of delivered via SMTP:

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

But after installing django-contact-form 1.4.2 and setting up as directed in the quick-start docs, submitting the contact form shows the success page but without any message printed to the console and with no errors shown anywhere. By contrast, using the exact same settings, user registration via django-registration produces the user account activation email message in the console, as expected.

As an additional test, I replaced the above setting with:

EMAIL_HOST = 'localhost'
EMAIL_PORT = '1025'

... and opened a separate terminal session to spawn an SMTP server via:

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

... but submitting the contact form produces the same result: displays success page without delivering any mail and without displaying any errors.

Environment:

  • Python 3.6.3
  • Django 1.11.8 (also tested with 1.11.7, just in case, but same result)

Contact form template:

{% extends "base.html" %}
{% load i18n %}

{% block content %}
<h3>{% trans "Contact Us" %}</h3>
<form method="post">
    {% csrf_token %}
    {{ form.as_p }}
    <button type="submit">{% trans "Send Message" %}</button>
</form>
{% endblock %}

Perhaps I'm doing something irretrievably silly, but if so, I cannot fathom what that might be. What might I do to track down the source of the problem in order to resolve it?

I don't really have any ideas on this, but I can leave it open in case someone wanders by with a solution or at least some pointers in the right directcion.