Skip to content

fixes to code that determines whether to send an email

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

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 of do_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.

Merge request reports