Re: Testing email settings

2015-03-09 Thread Aymeric Augustin
2015-03-09 17:44 GMT+01:00 Gavin Wahl :

> I expect this command to work with any email backend and to actually do a
> complete, end-to-end test of the configuration.
>
> I agree.

Another example: my SMTP provider will accept emails but put them on hold
until you've validated the sender's address. Only an end-to-end test can
detect this.

-- 
Aymeric.

-- 
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/CANE-7mWwhtE5oMtBhOQAcMA-HtxpSkgzXxSmHXEXDCAED6Uk_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Testing email settings

2015-03-09 Thread Gavin Wahl
> 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.

This wouldn't be useful to me at all. For one, it only is defined for an 
SMTP backend. Also, I wouldn't trust that a successful connection means 
that the configuration is correct. I've seen circumstances, especially if 
sending through a local sendmail, that will result in a successful 
connection but there is still a misconfiguration. 

I expect this command to work with any email backend and to actually do a 
complete, end-to-end test of the configuration.

-- 
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/6645495f-dbd3-42b9-afc4-5c5a204af487%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Testing email settings

2015-02-27 Thread Tom Evans
On Fri, Feb 27, 2015 at 9:01 AM, aRkadeFR  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.


Re: Testing email settings

2015-02-27 Thread aRkadeFR

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

On 02/27/2015 12:45 AM, Russell Keith-Magee wrote:

Hi Gavin,

I've lost track of how many times I've written that exact code when 
setting up a new box - I just didn't wrap it up as a management 
command. There's a similar testing cycle with new cache settings.


My only concern would be the one that Tim expressed - that it's 
ultimately a one line shell command, so it's not a whole lot of gain. 
However, the counterpoint to that is that you can't just reload 
settings, so you have to retype (or rely on command history). I agree 
the benefit is marginal, but I think it's a nice enough convenience, 
and it's not going to be a major maintenance overhead, so I think it's 
probably worth including.


I also agree with Collin, but on a technicality. I don't think Django 
needs to provide a general purpose mail-sending utility that could be 
used in scripts; however, I *do* think that if we're going to provide 
a test tool, any arguments we provide should match the standard 
defined by existing tools like sendmail. Effectively, that probably 
means that someone *could* use this test tool as a general purpose 
command-line mail tool - but I think that's a happy accident, not a 
design goal.


Yours,
Russ Magee %-)



On Fri, Feb 27, 2015 at 1:59 AM, Gavin Wahl > wrote:


I opened a ticket for this but was asked to discuss it on the
mailing list.

When configuring django to send emails through an SMTP server,
there are usually many different settings to try to get it to
work. I've written a management command that just sends an email
to make testing the settings easier. I'm wonder if there's any
interest in including this command in django?
Here's the command: ​

https://github.com/fusionbox/django-fusionbox/blob/master/fusionbox/core/management/commands/send_test_email.py

https://code.djangoproject.com/ticket/24419
-- 
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/910e45cf-39f1-421b-bae4-667a21069388%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.


--
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/CAJxq84-xW%3DDthARUYjOispxZocQussq%3DknP_TzX0_br4ufypAw%40mail.gmail.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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/54F0326A.4010200%40arkade.info.
For more options, visit https://groups.google.com/d/optout.


Re: Testing email settings

2015-02-26 Thread Russell Keith-Magee
Hi Gavin,

I've lost track of how many times I've written that exact code when setting
up a new box - I just didn't wrap it up as a management command. There's a
similar testing cycle with new cache settings.

My only concern would be the one that Tim expressed - that it's ultimately
a one line shell command, so it's not a whole lot of gain. However, the
counterpoint to that is that you can't just reload settings, so you have to
retype (or rely on command history). I agree the benefit is marginal, but I
think it's a nice enough convenience, and it's not going to be a major
maintenance overhead, so I think it's probably worth including.

I also agree with Collin, but on a technicality. I don't think Django needs
to provide a general purpose mail-sending utility that could be used in
scripts; however, I *do* think that if we're going to provide a test tool,
any arguments we provide should match the standard defined by existing
tools like sendmail. Effectively, that probably means that someone *could*
use this test tool as a general purpose command-line mail tool - but I
think that's a happy accident, not a design goal.

Yours,
Russ Magee %-)



On Fri, Feb 27, 2015 at 1:59 AM, Gavin Wahl  wrote:

> I opened a ticket for this but was asked to discuss it on the mailing list.
>
> When configuring django to send emails through an SMTP server, there are
> usually many different settings to try to get it to work. I've written a
> management command that just sends an email to make testing the settings
> easier. I'm wonder if there's any interest in including this command in
> django?
> Here's the command: ​
> https://github.com/fusionbox/django-fusionbox/blob/master/fusionbox/core/management/commands/send_test_email.py
>
> https://code.djangoproject.com/ticket/24419
>
> --
> 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/910e45cf-39f1-421b-bae4-667a21069388%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAJxq84-xW%3DDthARUYjOispxZocQussq%3DknP_TzX0_br4ufypAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Testing email settings

2015-02-26 Thread Gavin Wahl
I opened a ticket for this but was asked to discuss it on the mailing list.

When configuring django to send emails through an SMTP server, there are 
usually many different settings to try to get it to work. I've written a 
management command that just sends an email to make testing the settings 
easier. I'm wonder if there's any interest in including this command in 
django?
Here's the command: 
​https://github.com/fusionbox/django-fusionbox/blob/master/fusionbox/core/management/commands/send_test_email.py

https://code.djangoproject.com/ticket/24419

-- 
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/910e45cf-39f1-421b-bae4-667a21069388%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.