Jump to content

elcash_36

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by elcash_36

  1. Hi! Well, i have a new problem guys and i think this is the best way to solve it. I have this PHP code, it's very simple, but when i click on SEND it appears "Message sent correctly". Everything is OK. But when i enter HOTMAIL to see the e-mail sent, it doesn't appears. How could be this? This is the PHP code i'm using: <?php $Name = $_POST['Name']; $email = $_POST['email']; $Company = $_POST['Company']; $Subject = $_POST['Subject']; $header = 'From: ' . $email . " \r\n"; $header .= "X-Mailer: PHP/" . phpversion() . " \r\n"; $header .= "Mime-Version: 1.0 \r\n"; $header .= "Content-Type: text/plain"; $message = "This message was sent by " . $Name . ", from " . $Company . " \r\n"; $message .= "His e-mail is: " . $email . " \r\n"; $message .= "Subject: " . $Subject . " \r\n"; $message .= "Message: " . $_POST['message'] . " \r\n"; $message .= "Sent: " . date('d/m/Y', time()); $for = '[email protected]'; $subject = "Subject"; if (mail($for, $subject, $message, $header)) { echo("<p>Message sent correctly!</p>"); } else { echo("<p>¡ERROR! Message not sent...</p>"); } ?>
  2. Thank you!! Now I have a different problem... the e-mail doesn't appears in my Inbox.
  3. Hello, my name is Martin. I'm new to PHP and I'm trying to create a form to send e-mails. I've done everything but in the moment I click on "Enviar" it appears this message: Parse error: syntax error, unexpected T_VARIABLE in /home/lucas/public_html/Espanol/Contacto/send.php on line 21 Here is my PHP code: <?php $Nombre = $_POST['Nombre']; $email = $_POST['email']; $Empresa = $_POST['Empresa']; $Asunto = $_POST['Asunto']; $header = 'De: ' . $email . " \r\n"; $header .= "X-Mailer: PHP/" . phpversion() . " \r\n"; $header .= "Mime-Version: 1.0 \r\n"; $header .= "Content-Type: text/plain"; $mensaje = "Este mensaje fue enviado por: " . $Nombre . ", de " . $Empresa . " \r\n"; $mensaje .= "Su mail es: " . $email . " \r\n"; $mensaje .= "Asunto: " . $Asunto . " \r\n"; $mensaje .= "Mensaje: " . $_POST['mensaje'] . " \r\n"; $mensaje .= "Enviado: " . date('d/m/Y', time()); $para = '[email protected]'; $asunto = 'Asunto'; if (mail($para, $asunto, $mensaje $header)) { echo("<p>¡Mensaje enviado correctamente!</p>"); } else { echo("<p>¡ERROR! Mensaje no enviado...</p>"); } ?> Thank you very much!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.