don't report "Internal Server Error" if mail already exists
This commit is contained in:
parent
4ea74637a3
commit
fbbf8352cf
1 changed files with 1 additions and 1 deletions
|
@ -220,7 +220,7 @@ def receive_email(envelope, log=None):
|
||||||
|
|
||||||
if Email.objects.filter(reference=header_message_id).exists(): # break before issue thread is created
|
if Email.objects.filter(reference=header_message_id).exists(): # break before issue thread is created
|
||||||
log.warning("Email already exists")
|
log.warning("Email already exists")
|
||||||
raise Exception("Email already exists")
|
raise SpecialMailException("Email already exists")
|
||||||
|
|
||||||
recipient = envelope.rcpt_tos[0].lower() if envelope.rcpt_tos else header_to.lower()
|
recipient = envelope.rcpt_tos[0].lower() if envelope.rcpt_tos else header_to.lower()
|
||||||
sender = envelope.mail_from if envelope.mail_from else header_from
|
sender = envelope.mail_from if envelope.mail_from else header_from
|
||||||
|
|
Loading…
Add table
Reference in a new issue