Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
First you need to create an initialization module as a container for your override code. You will find details of how to do this here:
Make sure your module is dependent on the EPiServer.Web.InitializationModule using the ModuleDependency attribute:
[ModuleDependency(typeof(EPiServer.Web.InitializationModule))]
In the Initialize method of your module you can add the following code to customize the email output:
BaseLibrary.Channel.IChannel channel = new SynchronousChannel("xformdata");
EPiServer.XForms.Implementation.EMailConnection emailSender = new EPiServer.XForms.Implementation.EMailConnection();
emailSender.Subject = "MySubject"
emailSender.XMailer = "EPiServer XForms";
emailSender.XsltUrl = url to an Xslt file that transforms the XML Document containin the post;
emailSender.From = "";
emailSender.To = "";
channel.SendEvent += new BaseLibrary.Channel.ChannelEventHandler(emailSender.SendEmail);
channel.SendEvent += new BaseLibrary.Channel.ChannelEventHandler(new EPiServer.XForms.Implementation.HttpConnection().HttpRepost);
channel.SendEvent += new BaseLibrary.Channel.ChannelEventHandler(XForms.XFormData.SaveEventHandler);
BaseLibrary.Context.Repository.UnregisterChannel("xformdata");
BaseLibrary.Context.Repository.RegisterChannel(channel);
Please note that I have not compiled or tested this code :-)
Hello.
When the XForm sends an email out - is there any files/assembly/code that EPiServer uses that determines how this looks when it is outputted? If so, where is it!?
We wish to customise it, so wondering where to start?
Thanks.