factorisation: site_lang, posts_per_page, site_license, contact dynamique
This commit is contained in:
@@ -46,13 +46,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
if (!$error && $contactEmail !== '') {
|
||||
$subjectClean = mb_encode_mimeheader(
|
||||
'[varlog contact] ' . mb_strimwidth($subject, 0, 100, '…'),
|
||||
'[' . siteTitle() . ' contact] ' . mb_strimwidth($subject, 0, 100, '…'),
|
||||
'UTF-8',
|
||||
'B'
|
||||
);
|
||||
$nameClean = mb_encode_mimeheader($name, 'UTF-8', 'B');
|
||||
|
||||
$headers = 'From: =?UTF-8?B?' . base64_encode('varlog contact') . "?= <noreply@varlog>\r\n";
|
||||
$fromEmail = $_ENV['CONTACT_FROM_EMAIL'] ?? ('noreply@' . (parse_url(APP_URL, PHP_URL_HOST) ?? 'localhost'));
|
||||
$headers = 'From: =?UTF-8?B?' . base64_encode(siteTitle() . ' contact') . "?= <{$fromEmail}>\r\n";
|
||||
$headers .= "Reply-To: {$nameClean} <{$from}>\r\n";
|
||||
$headers .= "Content-Type: text/plain; charset=UTF-8\r\n";
|
||||
$headers .= "Content-Transfer-Encoding: 8bit\r\n";
|
||||
|
||||
Reference in New Issue
Block a user