0

I have the following problem. I have my website on tonohost, the page to send mail is: http://nutrivida.tonohost.com/WF_Contactenos.html, I use html and php, but I have tried many things but I have not been able to send mail. I reached out to hosthost, and they tell me their email service is fine. I wanted to test with a simple php code, but still could not, this is the code (send.php):

<?php

$mensaje = "Línea 1\r\nLínea 2\r\nLínea 3";

$mensaje = wordwrap($mensaje, 70, "\r\n");

mail('myemail@gmail.com', 'Mi título', $mensaje);
header('Location:WF_Contactenos.html');
?>

I call it as follows:

<form action="enviar.php" method="post">
...
<div class="form-row justify-content-center">
                <div class="col-md-6 mb-3">
                    <button id="btn_enviar" class="btn btn-outline-primary btn-lg btn-block" type="submit">Enviar</button>
                </div>
            </div>
 </form>

I'd appreciate your help

nasck
  • 71
  • 1
  • 7
  • Continue reading on php.net! Supposing that you read it in spanish, read the "notas". I would recommend you to use a mail-class like phpmailer for this. It makes sending mails easier. – Bernhard May 16 '20 at 23:33
  • Use phpmailer rather than native mail – Vinay May 17 '20 at 10:59

0 Answers0