- Issue created by @id.rem.dev
- last update
over 1 year ago 27 pass - @idremdev opened merge request.
- last update
over 1 year ago 27 pass
Right now, all the custom headers are getting transformed to lowercase in SMTPMailSystem::mail()
line 217:
$headers = array_change_key_case($message['headers']);
Totally makes sense to unify keys and apply checks.
In the end of switch/case, the default case adds the custom header as it is, but by that moment, the header is in lower case and the message client ignores it.
SMTPMailSystem::mail() line 478:
$mailer->AddCustomHeader($key . ': ' . $value);
E.g. if add 'In-Reply-To' in any hook_mail_alter()
, the email client will receive it as 'in-reply-to' and will ignore it.
At least, the gmail ignores it.
Add 'In-Reply-To' header in hook_mail_alter()
Unify the custom header with ucwords()
and separator equal to '-'
$mailer->AddCustomHeader(ucwords($key, '-') . ': ' . $value);
The only header, so far, that does not follow the pattern Part1-Part2 is MessageID. Add case to set MessageID property if passed.
case 'messageid':
$mailer->MessageID = $value;
break;
-
-
-
-
Needs review
1.0
Code