'MIME-Version' => '1.0',
'Content-Type' => 'text/plain; charset=UTF-8; format=flowed; delsp=yes',
'Content-Transfer-Encoding' => '8Bit',
'X-Mailer' => 'Drupal',
];
// To prevent email from looking like spam, the addresses in the Sender and
// Return-Path headers should have a domain authorized to use the
// originating SMTP server.
$headers['From'
] =
$headers['Sender'
] =
$headers['Return-Path'
] =
$site_mail;
// Make sure the site-name is a RFC-2822 compliant 'display-name'.
if ($site_mail) { $mailbox =
new MailboxHeader('From',
new Address($site_mail,
$site_config->
get('name'
) ?: ''
));
$headers['From'
] =
$mailbox->
getBodyAsString();
} if ($reply) { $headers['Reply-to'
] =
$reply;
} $message['headers'
] =
$headers;
// Build the email (get subject and body, allow additional headers) by
// invoking hook_mail() on this module.
$this->moduleHandler->
invoke($module, 'mail',
[$key, &
$message,
$params]);