-
AuthorPosts
-
May 5, 2013 at 1:49 am #22838
Hi there,
I have a few different forms I have setup throughout my site, from simple contact forms to more complex forms. I went to test them out and the validation worked fine, and when I clicked submit the button went away (im guessing its suppose to do that?).
Anyways the account email it is linked to never received the email I sent. However on one of the forms I included an autoreply email, which I did receive about 5 minutes later.
Any ideas why none of the contact forms are being sent to the admin email?
May 5, 2013 at 3:42 am #117438it’s not working for me either ;-(
hope to get response here. Searching the forums didn’t work.
May 5, 2013 at 6:53 am #117439Maybe your hoster restricts outgoing mails – eg this user: https://kriesi.at/support/topic/change-the-from-parameter-on-choices-theme had the same problem. Enfold introduced a new filter which allows you to change the “from” address without hacking the core files. Add following code to the bottom of functions.php:
add_filter('avf_form_from', 'avia_change_from', 10, 3);
function avia_change_from($from,$new_post,$params){
$from = ' (Email address hidden if logged out) ';
return $from;
}May 5, 2013 at 7:08 pm #117440This seemed to have worked! Thanks so much! However I did notice that the autoreply didn’t come in. Thats very low on the list of my worries, so as long as the primary function works (and it does) I’m a happy camper :)
May 5, 2013 at 8:39 pm #117441Hmm actually it seems to be sending the autoreply to the admin email as well, even if a different user email is being entered.
May 6, 2013 at 5:22 am #117442I applied the patch, and it still not working.
Mine is a “local MAMP” setup.
May 6, 2013 at 6:28 am #117443@TechShad – if you’re working on a local server the mail won’t work if the server is not configured properly: http://www.blog.tripleroi.com/2012/05/solvedenabling-sendmail-on-localhost.html
@doafilms – yes unfortunately there’s no way to fix this with a hook atm. You can edit wp-contentthemesenfoldframeworkphpclass-form-generator.php manually though – open up the file and replace:
mail($from, $this->form_params['autoresponder_subject'], $message, $header);
with:
if(!empty($this->autoresponder[0]))
{
$from = $_POST[$this->autoresponder[0]];
$usermail = true;
}
else
{
$email_variations = array( 'e-mail', 'email', 'mail' );
foreach($email_variations as $key)
{
foreach ($new_post as $current_key => $current_post)
{
if( strpos($current_key, $key) !== false)
{
$from = $new_post[$current_key];
$usermail = true;
break;
}
}
if($usermail == true) break;
}
}
mail($from, $this->form_params['autoresponder_subject'], $message, $header);We’ll include a hook in the next update.
June 2, 2013 at 2:50 pm #117444Contact not working for me even if “Your message has been sent!” pops. I never receive e-mails..
June 3, 2013 at 2:47 pm #117445I am having the same problem as gmarco.
June 4, 2013 at 1:20 am #117446The mail function just uses the default php mail function. You can check that its working by trying another plugin like Contact Form 7 with a basic form.
You may also need to use an email address that is hosted on your server and if it still doesn’t work contact your hosting provider to make sure you can send mail using wordpress and php mail.
Regards,
Devin
-
AuthorPosts
- The topic ‘Contact Form not submitting emails’ is closed to new replies.