Skip to content

don't check 'do not email' etc. when using alternate recipient

JonGold requested to merge JonGold/pdfapi:alternate-email into master

Steps to replicate

  • Set up a CiviRule with a "Send PDF" action.
  • Set your own email address as the "alternate recipient".
  • Trigger the rule for a contact who has their primary email marked as "on hold".

Expected Result

You receive the PDF.

Actual Result

You don't.

This isn't true in Email API, because of this line which skips these checks when using an alternate recipient. This adds the same check here.

As a secondary issue, it looks like do_not_mail is used when do_not_email is intended, so I fixed that as well.

Merge request reports

Loading