Contact Form Not Working
-
Hi, I am just using a free theme I found online for a simple website for my partner and everything is great except for the contact form which is not sending mail. I have exhausted whatever minimal knowledge I have on the matter and could use some help.
the site is here – https://katiespoodleparlour.co.uk/
and the only reference I can find in the header is this piece:
//Send the mail $emailSent = false; $contact['emailTo'] = get_bloginfo('admin_email'); $contact['body'] = "Name: ".$contact['contactname']." \n\nEmail: ".$contact['email']." \n\nSubject: ".$contact['subject']." \n\nComments:\n ".$contact['message']; $contact['headers'] = "From: " . $contact['contactname'] . " <".$contact['email'].">\nReply-To: " . $contact['contactname'] . " <".$contact['email'].">"; if(mail($contact['emailTo'], $contact['subject'], $contact['body'], $contact['headers'])){ $emailSent = true;
I have also found this reference in the footer
<?php if(!empty($hasError)) { //If errors are found ?> <p class="error">Please check that you've filled all the fields with valid information. Thank you.</p> <?php } ?> <?php if(TRUE === $emailSent) { //If email is sent ?> <p><strong>Email Successfully Sent!</strong></p> <p>Thank you <strong><?php echo htmlentities($contact['contactname']);?></strong> for using my contact form! Your email was successfully sent and I will be in touch with you soon.</p> <?php } ?> <form method="post" action="" id="contactform" class="clearfix"> <input type="hidden" name="submitted" value="1" /> <div> <label for="contactname"><strong>Name:</strong></label> <input type="text" size="50" name="contactname" id="contactname" class="required" value="<?php if(!empty($contact['contactname'])) echo htmlentities($contact['contactname']); ?>" /> </div> <div> <label for="email"><strong>Email:</strong></label> <input type="text" size="50" name="email" id="email" class="required email" value="<?php if(!empty($contact['email'])) echo htmlentities($contact['email']); ?>" /> </div> <div> <label for="subject"><strong>Subject:</strong></label> <input type="text" size="50" name="subject" id="subject" value="<?php if(!empty($contact['subject'])) echo htmlentities($contact['subject']); ?>" /> </div> <div> <label for="message"><strong>Message:</strong></label> <textarea rows="5" cols="50" name="message" id="message" class="required"><?php if(!empty($contact['message'])) echo htmlentities($contact['message']); ?></textarea> </div> <input type="submit" value="" name="submit" class="submit clearfix"/> </form>
Anyone have any ideas?
Thanks in advance,
Theo
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Contact Form Not Working’ is closed to new replies.