I am creating a form for my personal website, where the user will fill in with first name, last name, email, password and message and this information will be sent to my personal email.
Sending the form is already working perfectly, with the PHP PHPMailer Lib.
//send the message, check for errors
if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Enviado com sucesso!"
}
However, I would like instead of echo "Enviado com sucesso!"
to display a message of success or failure with the Toast Framework Dialogue materialize.