SimpleMachines / SMF

Simple Machines Forum — SMF in short — is free and open-source community forum software, delivering professional grade features in a package that allows you to set up your own online community within minutes!
https://www.simplemachines.org/
Other
581 stars 251 forks source link

Email Header Improvements and Suggesstions #7956

Open VBGAMER45 opened 9 months ago

VBGAMER45 commented 9 months ago

Was working on a mod to add List-Unsubscribe List-Unsubscribe-Post: List-Unsubscribe=One-Click

Due google new change which makes it urgents: https://support.google.com/mail/answer/81126?sjid=5308947540389480254-NC which affect people sending more than 5k a day to gmail.com This would affect newsletter mailings and large sites. I think this should be looked at for SMF too those headers.

Noticed the headers Message-ID not unique per email sent same along with date/time

$headers .= 'Date: ' . gmdate('D, d M Y H:i:s') . ' -0000' . $line_break;

if ($message_id !== null && empty($modSettings['mail_no_message_id'])) $headers .= 'Message-ID: <' . md5($scripturl . microtime()) . '-' . $message_id . strstr(empty($modSettings['mail_from']) ? $webmaster_email : $modSettings['mail_from'], '@') . '>' . $line_break;

Suggestion: Sender header added. $headers .= 'Sender: ' . (empty($modSettings['mail_from']) ? $webmaster_email : $modSettings['mail_from']) . $line_break;

For @gmail.com add Feedback-ID: header acts as a FBL. Feedback-ID: https://support.google.com/mail/answer/6254652?hl=en

jdarwood007 commented 9 months ago

I have a PR for message id fixes: https://github.com/SimpleMachines/SMF/pull/7843 That should make the message ID compliant

VBGAMER45 commented 9 months ago

Great. I am thinking it should be probably unique though for each email going out. Was working on a mod thought about using hooks then realized i couldn't set custom headers for each email sent out, since values change., nor see the email address $to