From: vincent@cubedesigners.com Date: Tue, 8 Sep 2020 16:43:54 +0000 (+0000) Subject: wait #3865 @0:10 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=3dfb85d033d26fe098c5f489d52dd9ff295fa8b1;p=cubeextranet.git wait #3865 @0:10 --- diff --git a/fluidbook/mailer/index.php b/fluidbook/mailer/index.php index 8537f327c..4d35fc776 100644 --- a/fluidbook/mailer/index.php +++ b/fluidbook/mailer/index.php @@ -54,7 +54,7 @@ function process() $mail->CharSet = 'UTF-8'; $mail->From = 'no-reply@fluidbook.com'; - $mail->FromName = 'Fluidbook'; + $mail->FromName = $_POST['_from'] ?? 'Fluidbook'; $mail->addAddress($_POST['_recipient']); if (isset($_POST['email'])) { $mail->addReplyTo($_POST['email']); @@ -99,20 +99,26 @@ function buildEmail($data) 'surname' => ['fr' => 'Nom', 'en' => 'Surname'], 'first_name' => ['fr' => 'Prénom', 'en' => 'First Name'], 'phone' => ['fr' => 'Téléphone', 'en' => 'Phone'], + 'phone_number' => ['fr' => 'Téléphone', 'en' => 'Phone'], 'city' => ['fr' => 'Ville', 'en' => 'City'], 'email' => ['fr' => 'E-mail', 'en' => 'Email'], 'message' => ['fr' => 'Message', 'en' => 'Message'], + 'country' => ['fr' => 'Pays', 'en' => 'Country'], + 'position' => ['fr' => 'Poste', 'en' => 'Position'], + 'organization' => ['fr' => 'Organization', 'en' => 'Organization'], + 'best_time_to_contact' => ['fr' => 'Heure de contact préférée', 'en' => 'Best time to contact'], + 'more_info' => ['fr' => 'Plus d\'information', 'en' => 'More info'], ]; $locale = $data['_locale'] ?? 'en'; - $res = $labels['data']['locale'].': ' . date('Y-m-d H:i:s') . "\n\n"; + $res = $labels['date'][$locale] . ': ' . date('Y-m-d H:i:s') . "\n\n"; foreach ($data as $key => $value) { if (substr($key, 0, 1) === '_') continue; // Ignore keys starting with "_" // Tidy up key names for presentation - $key = $labels[$key][$locale]; + $key = $labels[$key][$locale] ?? $key; $res .= "$key: $value\n"; }