Jump to:

1999 Posts in 1421 Topics by 613 members

Form Questions

SilverStripe Forums » Form Questions » No Email from Submitted Form

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

Page: 1
Go to End
Author Topic: 2019 Views
  • allanaa
    Avatar
    Community Member
    10 Posts

    No Email from Submitted Form Link to this post

    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!

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: No Email from Submitted Form Link to this post

    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?

  • allanaa
    Avatar
    Community Member
    10 Posts

    Re: No Email from Submitted Form Link to this post

    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.

  • badjedi
    Avatar
    Community Member
    25 Posts

    Re: No Email from Submitted Form Link to this post

    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?

    2019 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.