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)?
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
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)?
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.
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?
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.
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?
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!