Merge branch 'trunk'

This commit is contained in:
Olivier Legat 2022-05-11 14:29:56 +02:00
commit 2bb28c9ae5
3 changed files with 14 additions and 5 deletions

View file

@ -24,4 +24,7 @@ RECAPTCHA_SITE=
RECAPTCHA_KEY=
#CONTACT RECIPIENTS
CONTACT_MAIL="loic.harnieh@pole-sbv.fr, anne-lise.clavel@pole-sbv.fr"
CONTACT_MAIL_RECRUTEMENT="pierre.baudhuin@pole-sbv.fr"
CONTACT_MAIL_COMMERCIAL="marketing.sbv@pole-sbv.fr,anne-lise.clavel@pole-sbv.fr,julie.perrot@pole-sbv.fr"
CONTACT_MAIL_PRESSE="marketing.sbv@pole-sbv.fr,anne-lise.clavel@pole-sbv.fr,julie.perrot@pole-sbv.fr"
CONTACT_MAIL_AUTRE="marketing.sbv@pole-sbv.fr,anne-lise.clavel@pole-sbv.fr,julie.perrot@pole-sbv.fr"

View file

@ -127,9 +127,10 @@ define('SMTP_SECURE', $_ENV['SMTP_SECURE']);
define('SENDER_MAIL', 'noreply@pole-sbv.fr');
define('SENDERNAME_MAIL', 'SBV');
define('FROM_MAIL', 'noreply@pole-sbv.fr');
define("CONTACT_MAIL", $_ENV['CONTACT_MAIL']);
//define('CONTACT_RECIPIENT', $_ENV['CONTACT_RECIPIENT']);
//define('MAIL_PASSERELLE', $_ENV['MAIL_PASSERELLE']);
define("CONTACT_MAIL_RECRUTEMENT", $_ENV['CONTACT_MAIL_RECRUTEMENT']);
define("CONTACT_MAIL_COMMERCIAL", $_ENV['CONTACT_MAIL_COMMERCIAL']);
define("CONTACT_MAIL_PRESSE", $_ENV['CONTACT_MAIL_PRESSE']);
define("CONTACT_MAIL_AUTRE", $_ENV['CONTACT_MAIL_AUTRE']);
/**
* For developers: WordPress debugging mode.

View file

@ -72,18 +72,23 @@ if('POST' == $_SERVER['REQUEST_METHOD'] && !empty($_POST['action']) && $_POST['
switch ($type) {
case 'recrutement':
$tt = "Recrutement";
$dest = CONTACT_MAIL_RECRUTEMENT;
break;
case 'besoin-commercial':
$tt = "Besoin Commercial";
$dest = CONTACT_MAIL_COMMERCIAL;
break;
case 'relation-presse':
$tt = "Relation Presse";
$dest = CONTACT_MAIL_PRESSE;
break;
case 'autre-demande':
$tt = "Autre Demande";
$dest = CONTACT_MAIL_AUTRE;
break;
default:
$tt = "";
$dest = CONTACT_MAIL_AUTRE;
break;
}
//------ Envoi Mail aux contacts Passerelle
@ -102,7 +107,7 @@ if('POST' == $_SERVER['REQUEST_METHOD'] && !empty($_POST['action']) && $_POST['
$bodyMail .= "Message :<br/>".$message."<br/>";
$bodyMail .= "</body></html>";
$subject = "Nouveau message du site SBV";
$envoiDone = wp_mail(explode(",",CONTACT_MAIL), $subject, $bodyMail, "", $pj);
$envoiDone = wp_mail(explode(",",$dest), $subject, $bodyMail, "", $pj);
$envoiDone = true;
}