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.

All other Modules /

Discuss all other Modules here.

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

Not Receiving Emails w/ UserForms


Go to End
Reply


15 Posts   4122 Views

Avatar
Pahn

Community Member, 7 Posts

21 March 2009 at 12:51am

I am using the latest SilverStripe 2.3.0 and downloaded the UserForms module..

But I am not receiving any email when someone try to fill the form... is there anything that needs additional configuration??

Avatar
JordanC

Community Member, 9 Posts

25 April 2009 at 3:50pm

Edited: 25/04/2009 3:51pm

I had this problem until I set a "from" email address for all the form emails.
And then it worked fine.

Try adding this to your mysite/_config.php

Email::setAdminEmail('YourEmail@Youremail.com');

Avatar
Kate

Community Member, 16 Posts

13 May 2009 at 2:12am

My userforms are all working except that emails are not being received. Does the site need to be live for this to work? It's only on my computer for now.

Avatar
rndmerle

Community Member, 24 Posts

13 May 2009 at 11:01am

Hi Kate.

You are on MacOSX ? on Windows ? on Linux ?

If you are on Linux, you just have to install a mail server, like Postfix :
- If you are on Fedora : sudo yum install postfix
- If you are on Ubuntu : sudo aptitude install postfix

Actually, if you are on Windows or MacOSX I don't know how to help you :p

Regards.

Avatar
JordanC

Community Member, 9 Posts

13 May 2009 at 11:05am

You might need to check your PHP mail settings on your local PC to get it to work.
Check Google for how to configure this properly.

I think you'll find once it is live and on a properly configured mail server it should work if you have set the Admin Email properly.

Avatar
Kate

Community Member, 16 Posts

14 May 2009 at 2:23am

I am on MacOSX.

Avatar
Kate

Community Member, 16 Posts

14 May 2009 at 2:40am

Jordan, I'm going to upload the site today, so I'll see how it goes. It could be more than that however since I'm not sure I did this part 100% right:

To implement, change the page’s class name to “a contact form”, an save. then:

1.
Make sure you have $Form in your template.
2.
Add fields under the form tab. (some fields will require extra components, such as options for a dropdown)
3.
Decide whether the form should email submissions, if so, add an email and check the box marked email form on submit.
4.
Add text to the submit button
5.
Add “on complete” text to show after a user has submitted the form
6.
Add the email templates
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)

Avatar
Kate

Community Member, 16 Posts

15 May 2009 at 8:00am

I have managed to install and run my site on a live server. The submission was sent once to my email from the UserForm and then I got got this message:
Parse error: syntax error, unexpected '@' in /homez.60/lasergra/www/SS/mysite/_config.php on line 15

What's up? Why did it work one time?

Go to Top