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.

All other Modules /

Discuss all other Modules here.

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

Userforms: set user email as from/sender email


Go to End


6 Posts   1154 Views

Avatar
suntrop

Community Member, 141 Posts

11 January 2013 at 10:58am

I am using Userforms and would like to have the from address (sender email) the email from the user submitting the form.

Is it - easily - possible to use a field from my form as the sender mail (or at least put it in the subject)?

Avatar
Willr

Forum Moderator, 5523 Posts

13 January 2013 at 8:56pm

Yes, although you can't send email from anyones address without spam filters going mad!

If you add an email field type to your userdefined form then you will have the option to set the 'from' option in the Email recipient popup to that email field.

Avatar
suntrop

Community Member, 141 Posts

13 January 2013 at 9:54pm

That's exactly what I want :-) But I am using SS 2.4 not SS 3. Can I override just some files to get this function? Perhaps I can just install 1.0 under SS 2.4?

Avatar
Willr

Forum Moderator, 5523 Posts

13 January 2013 at 10:03pm

This feature was added a while ago. It should be available in both 2.4 and 3.0 versions of the module. If you're on 2.4 download the latest from https://github.com/silverstripe/silverstripe-userforms/tree/0.5.

Avatar
suntrop

Community Member, 141 Posts

15 January 2013 at 1:45am

Thanks for the link. I uploaded the new userform from github to my website. I see the field and can select the email field as from address. But unfortunately it wont display. Instead of the email it says FTP User.

Mail header:
From: FTP User <75495-900841-admin@m17s3-2-14da.my-website.tld>

Seems to me, the from address isn't insert correct and my server can't recognize it as the from address?

Avatar
suntrop

Community Member, 141 Posts

19 January 2013 at 6:04am

I got it. After the update I had to recreate the page/form. Seems there are settings that didn't worked with the new version. My new form works like a charm :-)

Thanks!