Hello,
The php file on my remote server allows to send a new password by email (php file below). The password is contained in the $mdp variable and the email address in the $mail variable.
With B4A I would like to transfer the password and the email addresses in the respective variables of the php file and send email.
I imagine you should use OkHttpUtilis2, but no idea for code.
Can someone give me an idea or track to code properly
Thank you
The php file on my remote server allows to send a new password by email (php file below). The password is contained in the $mdp variable and the email address in the $mail variable.
With B4A I would like to transfer the password and the email addresses in the respective variables of the php file and send email.
I imagine you should use OkHttpUtilis2, but no idea for code.
Can someone give me an idea or track to code properly
Thank you
B4X:
<?php
$mail1 ="[email protected]";
$mdp = "abcd1234A";
$message2 = "Votre nouveau mot de passe";
$message_out = "Votre nouveau mot de passe est : "."$mdp". " .";
$to = "$mail1,[email protected]";
// adresse MAIL OVH liée à l’hébergement.
$from = "[email protected]";
ini_set("SMTP", "smtp.pau.jazz.fr"); // Pour les hébergements mutualisés Windows de OVH
// *** Laisser tel quel
$JOUR = date("Y-m-d");
$HEURE = date("H:i");
$Subject = "Kindasitting - MDP";
//$madate_us = "$annee"."-"."$mois"."-"."$jour";
$mail_Data = "";
$mail_Data .= "<html> \n";
$mail_Data .= "<head> \n";
$mail_Data .= "<title> Subject </title> \n";
$mail_Data .= "</head> \n";
$mail_Data .= "<body> \n";
$mail_Data .= "Bonjour, <br> \n";
$mail_Data .= "$message_out <br> \n";
$mail_Data .= "$message2 <br> \n";
$mail_Data .= "<br> \n";
//$mail_Data .= "bla bla <font color=red> bla </font> bla <br> \n";
$mail_Data .= "Bien cordialement<br> \n";
$mail_Data .= "PAU Jazz <br> \n";
$mail_Data .= "F.D. <br> \n";
$mail_Data .= "<img src='http://Mysite/logo/logo_100.png' /><br> ";
$mail_Data .= "</body> \n";
$mail_Data .= "</HTML> \n";
$headers = "MIME-Version: 1.0 \n";
$headers .= "Content-type: text/html; charset= utf8\n";
$headers .= "From: $from \n";
$headers .= "Disposition-Notification-To: $from \n";
// Message de Priorité haute
// -------------------------
$headers .= "X-Priority: 1 \n";
$headers .= "X-MSMail-Priority: High \n";
$CR_Mail = TRUE;
$CR_Mail = @mail ($to, $Subject, $mail_Data, $headers);
if ($CR_Mail === FALSE)
{
echo " Erreur envoi mail <br> \n";
}
else
{
echo " Mail envoyé <br> \n";
}
?>