0

I have a pretty basic Freeform contact form set up (fields are: first_name, last_name, email, user_message). The form is set so that, when submitted, the admin receives an email to alert him/her to the fact that there is a new message, the user receives an email as confirmation of their submission, and the user is redirected to the thank you page (which recaps their message for them). The redirect and the admin notification are both working perfectly, but for some reason the User Notification is not.

I have a user notification template set up, I have user notification enabled in the CP, and the 'email' field is set as the delivery address. These settings are made in the CP but I also tried adding them into the form explicitly as parameters -- still no luck.

I should add that I do have a sender address correctly set in EE's email preferences (that tripped me up on a previous occasion when I was unable to receive admin notifications -- they were getting stopped as suspicious and spammy because the sender's address was blank). Also, the user emails are not showing up in the spam traps (either at server level or locally)

Anybody have any ideas why admin notification emails would go out/be received whilst user notifications won't? And where can I check, eg. logs, to see if the email is actually being transmitted by EE (in which case it will presumably be a mail server problem)?

Last thing: I'm testing this on MAMP.

Thanks.

1

Without seeing the code you're using it's a bit tough to know for sure, but I have come up against this issue quite a few times before and it was because I missed out the user_email_field and notify_user parameters.

For example:

{exp:freeform:form
   form_name="contact"
   return="contact_us/thank_you"
   user_email_field="user_email"
   notify_user="yes"
}

// ... rest of your form code

<input type="text" name="user_email" id="user_email">

{/exp:freeform:form}

This should then tell freeform that you want to notify users on submit and to use the user_email field for their email address.

Hope that helps

Possible solution for MAMP/Similar users.

If mail isn't sending as it should whilst using a local environment (such as MAMP), it's worth trying on a live environment before you try to dig in deeper. After all, that is where your site will live, so as long as it works there, your good to go :)

If it doesn't work on a live server, you can be pretty sure the error is code based.

| improve this answer | |
  • Thanks Alec. But I already have those params in place: notify_user="yes" user_email_field="email" user_notification_template="confirmation_email_to_sender" ..and they are really only replicating what is already set in the CP. It's a mystery, I tells ya! – Rick Lecoat May 14 '14 at 13:48
  • 1
    Okay no worries, have you tried putting it onto a live server to test? – Alec Ritson May 14 '14 at 13:52
  • No, that's the next move I guess. I just also tried changing the email field name from 'email' to 'user_email' in case the former was reserved. Still no luck. Thing is, if the MAMP server was the problem I'd expect that to interfere with the admin notifications too, but they come through just fine and dandy. – Rick Lecoat May 14 '14 at 13:58
  • 1
    Yeah I know what you mean, but MAMP can work in mysterious ways. I'd recommend getting it onto a live environment to see if it works before you go crazy haha, you'd be surprised what works in a live environment and not on MAMP :) – Alec Ritson May 14 '14 at 14:02
  • Well, Alec, when you're right you're right. Moved it to a live server and the user notification came through just fine, even after I took out the override parameters from the form (so that stuff all gets set from the CP -- less things to remember to change). Thanks for the tip. – Rick Lecoat May 14 '14 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.