November Happy Hour will be moved to Thursday December 5th.

Change email sender, reciepients and subject dynamically at runtime.

Vote:
 

Hi,

I created a form that's globally used by the children of a parent node, I want to use that form because otherwise the same form has to be created each time for each child node.

Now I want to define a mail template in the "Send email after form submission" section in the settings tab of the form. Now when the form gets submitted I want to change the from to and subject before the actual mail gets send out, designed in the message template.

I already hooked op to the event:

FormsEvents.Instance.FormsSubmitting += Instance_FormsSubmitting;

But it seems I cannot change the values there, are there any other options or am I on the right track?

#199236
Nov 21, 2018 9:42
Vote:
 

You should write your own custom actor (can be inherite from SendEmailAfterSubmissionActor) to send the email yourself. In the Run method you provide fields dynamically. To see how to create an actor, you can see here https://github.com/episerver/EPiServer.Forms.Demo/tree/master/Implementation/Actors

#199239
Nov 21, 2018 10:55
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.