On Fri, Feb 27, 2015 at 9:01 AM, aRkadeFR <cont...@arkade.info> wrote: > Hello, > > I've written couple of time similar command for my project too. > > But if I take a step back, these commands (for my projects) are > only here to test that my SMTP settings are well setup. Thus, > the test sending email is quite unnecessary, I would like a check > that connects to the SMTP server (if the emails settings are > setup else do nothing) when the application starts. > (I don't know if there's something like saying to a SMTP server: > am I allowed here? without sending an actual email) > > Have a good day
In Simple Mail Transfer Protocol terms, it definitely is (EHLO, MAIL FROM, RCPT TO, then disconnect without sending DATA). But SMTP is not the only mail backend, and smptlib does not expose that level of connection detail - it will merely raise a different exception type if any of those commands do not return 250 status. Hey, that time spent reading RFC 821 at uni just paid off ;) Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFHbX1J0tS-QCCW6xJBuH0QuutPtV8S0m3zZo3VznR9YCTud3g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.