[Django] #22161: Sending an email with no recipients fails silently

44 views
Skip to first unread message

Django

unread,
Feb 27, 2014, 10:03:33 AM2/27/14
to django-...@googlegroups.com
#22161: Sending an email with no recipients fails silently
-----------------------------+--------------------
Reporter: ian@… | Owner: nobody
Type: Bug | Status: new
Component: Core (Mail) | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------
If EmailMessage.recipients() is empty, EmailMessage.send() returns 0
instead of raising an exception, even if fail_silently is False.

--
Ticket URL: <https://code.djangoproject.com/ticket/22161>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 27, 2014, 10:12:26 AM2/27/14
to django-...@googlegroups.com
#22161: Sending an email with no recipients fails silently
-----------------------------+--------------------------------------

Reporter: ian@… | Owner: nobody
Type: Bug | Status: new
Component: Core (Mail) | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by ian@…):

* needs_docs: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_better_patch: => 0


Comment:

I've fixed this in https://github.com/Ian-Foote/django/tree/ticket_22161.

--
Ticket URL: <https://code.djangoproject.com/ticket/22161#comment:1>

Django

unread,
Feb 27, 2014, 1:31:24 PM2/27/14
to django-...@googlegroups.com
#22161: Sending an email with no recipients fails silently
-----------------------------+---------------------------------------------

Reporter: ian@… | Owner: nobody
Type: Bug | Status: new
Component: Core (Mail) | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------
Changes (by claudep):

* stage: Unreviewed => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/22161#comment:2>

Django

unread,
Feb 28, 2014, 5:04:14 AM2/28/14
to django-...@googlegroups.com
#22161: Sending an email with no recipients fails silently
-----------------------------+---------------------------------------------

Reporter: ian@… | Owner: nobody
Type: Bug | Status: new
Component: Core (Mail) | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------
Changes (by erikr):

* cc: eromijn@… (added)


Comment:

But that's technically not an error condition. send() does exactly what
you asked it to do: send a mail to all recipients you specified. Why
should this throw an exception?

Also, people may have become dependent on the behaviour that send() can be
called even though recipients is empty. Therefore, if we do change this, I
think it warrants at least a mention in the release notes, as a backwards
incompatible change, although it will probably not hit too many users. I
checked briefly, but it seems the current behaviour is not explicitly
documented.

--
Ticket URL: <https://code.djangoproject.com/ticket/22161#comment:3>

Django

unread,
Feb 28, 2014, 7:48:20 AM2/28/14
to django-...@googlegroups.com
#22161: Sending an email with no recipients fails silently
-----------------------------+------------------------------------

Reporter: ian@… | Owner: nobody
Type: Bug | Status: new
Component: Core (Mail) | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------
Changes (by claudep):

* needs_docs: 0 => 1
* stage: Ready for checkin => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/22161#comment:4>

Django

unread,
Feb 28, 2014, 9:33:49 AM2/28/14
to django-...@googlegroups.com
#22161: Sending an email with no recipients fails silently
-----------------------------+------------------------------------

Reporter: ian@… | Owner: nobody
Type: Bug | Status: new
Component: Core (Mail) | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by ian@…):

I'm happy to add some documentation for this, but I'm not sure where is
appropriate.

--
Ticket URL: <https://code.djangoproject.com/ticket/22161#comment:5>

Django

unread,
Feb 28, 2014, 1:52:46 PM2/28/14
to django-...@googlegroups.com
#22161: Sending an email with no recipients fails silently
-----------------------------+------------------------------------

Reporter: ian@… | Owner: nobody
Type: Bug | Status: new
Component: Core (Mail) | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by claudep):

Erik has a point in his comment:3. We should first ponder arguments for or
against raising an exception when sending email with no recipients.

--
Ticket URL: <https://code.djangoproject.com/ticket/22161#comment:6>

Django

unread,
Aug 18, 2014, 11:13:34 AM8/18/14
to django-...@googlegroups.com
#22161: Document that sending an email with no recipients fails silently
--------------------------------------+------------------------------------
Reporter: ian@… | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.6

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* needs_docs: 1 => 0
* has_patch: 1 => 0
* component: Core (Mail) => Documentation
* type: Bug => Cleanup/optimization


Comment:

I think we should document the behavior. The `EmailMessage` class and
`receipients` argument is documented in `docs/topics/email.txt`.

--
Ticket URL: <https://code.djangoproject.com/ticket/22161#comment:7>

Django

unread,
Sep 4, 2014, 5:06:03 PM9/4/14
to django-...@googlegroups.com
#22161: Document that sending an email with no recipients fails silently
--------------------------------------+------------------------------------
Reporter: ian@… | Owner: nobody

Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.6
Severity: Normal | Resolution:
Keywords: afraid-to-commit | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by EvilDMP):

* keywords: => afraid-to-commit


Comment:

I've marked this ticket as especially suitable for people following the
​'''Don't be afraid to commit tutorial''' at the DjangoCon US 2014
sprints.

If you're tackling this ticket, please don't hesitate to ask me for
guidance if you'd like any, either at the sprints themselves, or here or
on the Django IRC channels, where I can be found as ''EvilDMP''.

--
Ticket URL: <https://code.djangoproject.com/ticket/22161#comment:8>

Django

unread,
Sep 5, 2014, 7:08:05 PM9/5/14
to django-...@googlegroups.com
#22161: Document that sending an email with no recipients fails silently
--------------------------------------+------------------------------------
Reporter: ian@… | Owner: oromero
Type: Cleanup/optimization | Status: assigned

Component: Documentation | Version: 1.6
Severity: Normal | Resolution:
Keywords: afraid-to-commit | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by oromero):

* status: new => assigned
* owner: nobody => oromero


--
Ticket URL: <https://code.djangoproject.com/ticket/22161#comment:9>

Django

unread,
Sep 5, 2014, 8:40:22 PM9/5/14
to django-...@googlegroups.com
#22161: Document that sending an email with no recipients fails silently
--------------------------------------+------------------------------------
Reporter: ian@… | Owner: oromero
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.6
Severity: Normal | Resolution: fixed

Keywords: afraid-to-commit | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"0f0a5c07f9f0f4d18d4c048ed6d9554965f79d5b"]:
{{{
#!CommitTicketReference repository=""
revision="0f0a5c07f9f0f4d18d4c048ed6d9554965f79d5b"
Fixed #22161 -- Documented send() with no recipients won't raise an
exception.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22161#comment:10>

Django

unread,
Sep 5, 2014, 8:41:04 PM9/5/14
to django-...@googlegroups.com
#22161: Document that sending an email with no recipients fails silently
--------------------------------------+------------------------------------
Reporter: ian@… | Owner: oromero
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.6
Severity: Normal | Resolution: fixed
Keywords: afraid-to-commit | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"414e3fc59dcb429d9d96a91348f7c0eb661d70fa"]:
{{{
#!CommitTicketReference repository=""
revision="414e3fc59dcb429d9d96a91348f7c0eb661d70fa"
[1.6.x] Fixed #22161 -- Documented send() with no recipients won't raise
an exception.

Backport of 0f0a5c07f9 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22161#comment:11>

Django

unread,
Sep 5, 2014, 8:41:09 PM9/5/14
to django-...@googlegroups.com
#22161: Document that sending an email with no recipients fails silently
--------------------------------------+------------------------------------
Reporter: ian@… | Owner: oromero
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.6
Severity: Normal | Resolution: fixed
Keywords: afraid-to-commit | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"af28f3c17515a1de9abb668942e896d777b67cba"]:
{{{
#!CommitTicketReference repository=""
revision="af28f3c17515a1de9abb668942e896d777b67cba"
[1.7.x] Fixed #22161 -- Documented send() with no recipients won't raise
an exception.

Backport of 0f0a5c07f9 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22161#comment:12>

Reply all
Reply to author
Forward
0 new messages