Defect #743

SMTP error when list of recipients is empty

Added by Marc Dequènes over 14 years ago. Updated over 14 years ago.

Status:ClosedStart date:2008-02-26
Priority:LowDue date:
Assignee:-% Done:


Category:Email notifications
Target version:-
Resolution: Affected version:


I found on my local MTA:
Feb 26 15:00:57 jones postfix/smtpd13527: warning: Illegal address syntax from localhost[] in RCPT command: <>
This is due to the user updating an issue but with mail preferences set to not mail himself for its own changes. As there is nobody watching the issue, the recipient list is empty.

In 'app/models/mailer.rb' create_mail(), super is called even if there is nothing to mail, causing this error. Perhaps something like :
super unless recipients.empty? and (not cc or cc.empty?) and (not bcc or bcc.empty?)
would do, but i'm not sure the Bcc-recipients feature would not cause the same SMTP error too (perhaps setting recipients = from would solve the issue in this case).

Associated revisions

Revision 1174
Added by Jean-Philippe Lang over 14 years ago

Do not send an email with no recipient, cc or bcc (closes #743).


#1 Updated by Jean-Philippe Lang over 14 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset r1174.

Also available in: Atom PDF