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

Userforms: set user email as from/sender email


Reply

6 Posts   507 Views

Avatar
suntrop

11 January 2013 at 10:58am Community Member, 131 Posts

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

13 January 2013 at 8:56pm Forum Moderator, 5511 Posts

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

13 January 2013 at 9:54pm Community Member, 131 Posts

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

13 January 2013 at 10:03pm Forum Moderator, 5511 Posts

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

15 January 2013 at 1:45am Community Member, 131 Posts

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

19 January 2013 at 6:04am Community Member, 131 Posts

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!