fixes to code that determines whether to send an email
This segment of code had a number of problems. I can submit separate PRs for each, but they're interconnected enough that they seemed worth fixing in one PR.
- Emails are aborted based on
do_not_mail
instead ofdo_not_email
. - When the "To Email" value is set, emails aren't going to the contact, but are still aborted if the contact has
do_not_email
,on_hold
etc. - There were a lot of lines dedicated to, "Skip if this is a multi-contact PDF" but we can skip this entire section if that's true.