Can now generate unsubscribe links for users (including adding these to commpanel emails)
Upon clicking these links, users can unsubscribe without logging in (within 7 days of being generated)
Email clients can also use a "oneclick" version to instantly unsubscribe a user with a single POST
The "From" email address for comm panel emails must now contain the LU domain or any LU subdomain (or a chapter-specific alias); there is a nice big red banner to announce this and there are frontend and backend checks to enforce this
To help chapters, we now use the info@subdomain.learningu.org email redirect (which is by default set to their "default" email address); this is now automatically populated in the "From" field
The "director_email" field for a program now must match our new "From" constraints. This is enforced at the database level and also in the new program and program settings forms.
I've set up a migration that will replace any existing "director_email" fields that don't match with info@subdomain.learningu.org. This migration also sets up the info@subdomain.learningu.org email redirect.
send_mail() also requires that the "from_email" matches these constraints and throws an error if this is not the case (just in case it somehow got through the above restrictions).
We now include a plaintext version of HTML emails to support all email clients (even plaintext-only ones)
Various minor fixes to emails that were being sent from domains/subdomains not associated with our DMARC records (like spoofing users when we sent the director an interview notification).
This does the following:
send_mail()
also requires that the "from_email" matches these constraints and throws an error if this is not the case (just in case it somehow got through the above restrictions).Fixes #1719 and fixes #3709 and fixes #1094.