don't check 'do not email' etc. when using alternate recipient
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.