feat/send-mail-to-member #81

Merged
florent.lesaout merged 10 commits from feat/send-mail-to-member into master 2024-03-20 14:04:39 +01:00
Showing only changes of commit 4380a086db - Show all commits

View File

@ -14,11 +14,12 @@ $domainFromMyEmail = (
) ? '' ) ? ''
: $myEmailSplitted[1]; : $myEmailSplitted[1];
$wantedContact = filter_input(INPUT_POST, 'contactTo', FILTER_VALIDATE_EMAIL); $wantedContact = filter_input(INPUT_POST, 'contactTo', FILTER_SANITIZE_SPECIAL_CHARS);
$wantedContact = ( $wantedContact = (
empty($wantedContact) empty($wantedContact)
|| strpos($wantedContact, '@') !== false
|| strpos($wantedContact, '&') !== false
|| empty($domainFromMyEmail) || empty($domainFromMyEmail)
|| substr($wantedContact, -strlen($domainFromMyEmail)) != $domainFromMyEmail
) ? $myEmail : "$wantedContact@$domainFromMyEmail" ; ) ? $myEmail : "$wantedContact@$domainFromMyEmail" ;
if(empty($_POST['namezzz']) || empty($_POST['emailzzz']) || empty($_POST['message'])) { if(empty($_POST['namezzz']) || empty($_POST['emailzzz']) || empty($_POST['message'])) {