Skip to content
Snippets Groups Projects
Commit 8f094d3c authored by Jairo Llopis's avatar Jairo Llopis Committed by Pedro M. Baeza
Browse files

[FIX] mail: Do not consider reply if no "To:" is found


If an email was sent with empty "To:" and a proper alias in "CC:" (or any of the similar valid headers that conform the `rpc_tos_localparts` array), before 40ae36b7 the email wouldn't get rejected. After that commit it would get bounced.

This comes from the not-so-obvious new python idiom used, `all()`. Check this out:

```python
>>> all([False])
False
>>> all([])
True
```

So, apart from the fix introduced in that commit, which seems valid, we have to make sure `email_to_localparts` actually has contents. Otherwise we are producing false bounces here.

@Tecnativa TT23437

closes odoo/odoo#49656

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent e49480fe
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment