#24419: Provide an easy way to test email connection
-----------------------------+-------------------------------------
Reporter: gavinwahl | Owner: gannetson
Type: New feature | Status: assigned
Component: Core (Mail) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+-------------------------------------
Comment (by gannetson):
Something like this throws an error when SMTP creds are wrong:
{{{
from django.core import mail
from django.core.mail.backends.smtp import EmailBackend
def _check_mail_settings(self):
connection = mail.get_connection()
if isinstance(connection, EmailBackend):
connection.open()
}}}
But I think this should be a new ticket/feature. This ticket, to me, is
really about sending an actual mail. Could I propose a new ticket to
create `testconnections` (like @imgraham suggested) that's to test other
connections (cache, ...) as well?
--
Ticket URL: <https://code.djangoproject.com/ticket/24419#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.e394d6341f96412ea27100dd71546958%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.