Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

No Email from Submitted Form


Go to End


4 Posts   3359 Views

Avatar
allanaa

Community Member, 10 Posts

4 March 2009 at 9:21am

I've got the userforms working. I get the submissions no problem in the admin section, but I cannot seem to get emails when people submit.

Being totally new to this kind of thing, I've gone through the help-modules:userforms (http://doc.silverstripe.com/doku.php?id=modules:userforms). I defined the email in the _config file in my root directory (is this the correct _config file?). I've set it to email form on submission and entered the email address. Is there anything else I am missing or not doing? The help page has the list seen below, but I am not quite sure what to do as it just lists files.

7. Ensure Email::setAdminEmail(’my@email.com’); is defined in _config.php of your project

* email/ReceivedFormEmail.ss
* email/SubmittedFormEmail.ss (See UserDefinedForm_SubmittedFormEmail. The email the admin will recieve once the form is submitted, if the “send copy to this email address” checkbox is ticked, a copy of this email will be sent to the user)
* use this template control for the email templates:

<% if Data %>
<ul>
<% control Data %>
<li>$Title: $Value</li>
<% end_control %>
</ul>
<% end_if %>

*ReceivedFormSubmission.ss (the template that the user is sent to, once the form is submitted - add $OnCompleteMessage in this template to show the “on complete” text)

Any help would be greatly appreciated. Thanks in advance!

Avatar
Willr

Forum Moderator, 5523 Posts

4 March 2009 at 2:02pm

Do you know if mail in general is working on your server?. One way to test this is to make a new file testmail.php and have something like this in it

<?php echo mail("myemail@email.org", "test msg", "OMG a test"); ?>

Then load that page. Does the email send?

Avatar
allanaa

Community Member, 10 Posts

13 March 2009 at 1:19am

Yeah I tried a testmail.php file and we do receive an email. Still not sure why we aren't getting them from the forms.

Avatar
badjedi

Community Member, 25 Posts

30 April 2009 at 8:32pm

I am having this same problem. I have tried the testmail.php email and it works.

But when the form is submitted it doesnt send the emails properly. It does show the filled form data in the CMS tho.

I am using shared hosting on Godaddy.com, Could this have something to do wiith it?