As described in issue #452.
ArgumentError: At least one recipient (To, Cc or Bcc) is required to send a message
It looks like this was introduced in commit: 310b4fc
When the comment author is the only notification_recipient, there are no recipients for the email.
This pull request fixes that by putting the logic of when to send an email notification in the Comment#emailable? method (like the one in App). A comment is "emailable" when its app is emailable and has recipients other than the comment author.
Comment emailable logic to decide when to send notifications
Test coverage for comment observer
Just to keep things DRY there should be an additional change:
app/mailers/mailer.rb line 38 should be changed from:
recipients = @app.notification_recipients - [comment.user.email]
recipients = comment.notification_recipients
Use comment notification recipients in mailer
You're right. That was one of the two reasons I added that method to Comment.
I changed it and I added a few basic tests cases for the comment_notification in mailer_spec. One of the cases checks that the recipients are delegated to Comment#notification_recipients.