Okay
  Public Ticket #2326190
contact-form.php
Closed

Comments

  • Chao started the conversation

    I am having issue with sending mail through contact-form.php. On the instruction it say to: Edit lines from 7 to 22 of your “contact-form.php” file. Place your email and message text. However I am getting error coming back.

    Its there something else that I am missing? I can create a generic mail.php and was able to send it from the server manually on the command line. Any help would be great. Thanks,

    Here is the error that I am seeing on the page:

    ”; //Subject or default subject $message_meta .= ‘Subject: ’. ( $subject ? $subject : $default_subject ) . ” ”; //adding another CUSTOM contact form fields that added by user to email message body foreach ($_POST as $key => $value) { //checking for standard fields if ($key 'name' || $key ‘message’ || $key 'subject' || $key ‘email’ ) { continue; } //adding key-value pare to email message body $message_meta .= stripslashes(strip_tags(trim($key))) . ’: ’ . stripslashes(strip_tags(trim($value))) . ” ”; } $message = $message_meta . ” ” . ‘Message:’ . ” ” . $message; $message = wordwrap($message, 70); if (mail($your_email, $subject, $message, $from)) { echo $email_was_sent; } else { $errors[] = $server_not_configured; echo ’’ . implode(‘ ’, $errors ) . ’’; } } else { echo ’’ . implode(‘ ’, $errors ) . ’’; } } else { // if “name” var not send (‘name’ attribute of contact form input field was changed or missing) echo ’”name” variable were not received by server. Please check “name” attributes for your input fields’; } ?>

  •  1,634
    Andrey replied

    Hello! Thanks for purchase!

    Please send us your contact-form.php?

    Best Regards!

  • Chao replied

    It will not let me attached in php, so I converted into a text file. I think it might be due to my apache not executing php and displaying it in plain text, but I can execute php in the command line. I am at a loss and any help will be awesome. Thanks,

  •  1,634
    Andrey replied

    Your contact-form.php looks fine, can you please provide a link to your page?

  • Chao replied

    I am re-installing my apache/php and see if somewhere along the line the configuration got corrupted. You can close this ticket and I will submit another one, if I am still having the same issue. Thanks for your time.

  •  1,634
    Andrey replied

    Hello, Dear Chao!

    Thank you for your reply.

    We are always glad to help you!

    Best Regarsd!