Mail function: how can I ensure that mail box of recipiend will be reached?
| From: | Manuel Dahmen | Date: | Fri, 21 Jul 2023 18:43:34 +0000 |
| Subject: | Mail function: how can I ensure that mail box of recipiend will be reached? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-328238@lists.php.net to get a copy of this message | ||
<?php
/*
* Copyright (c) 2023. Manuel Daniel Dahmen
*
*
* Copyright 2012-2023 Manuel Daniel Dahmen
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require_once "db.php";
if(isset($_POST["email"])) {
$email = $_POST["email"];
$to = $email;
$subject = "Lost password: recovery email from empty3.one agendaapp";
$message = "Récupérez votre mot de passw.\n\r".
"Lien: \n\r";
$headers = 'From: checkauth@empty3.one' . "\r\n" .
'Reply-To: checkauth@empty3.one' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
;
if(mail($to, $subject, $message, $headers)) {
?>
<p>Votre email de récupération de mot de passe a été envoyé. <?php //echo
$email; ?></p>
<?php
} else {
?>
<p style=".error">Votre e-mail de récupération de mot de passe n'a pas été
envoyé.</p>
<?php
}
?>
<?php
}