Hide menu Last updated: Jan 18 2017
Area: Episerver Add-ons Applies to versions: 4.3 and higher

Implementing an email actor

Note: Episerver Forms is only supported by MVC-based websites and HTML5-compliant browsers.

Episerver Forms can trigger customized emails when someone submits a form.

The editor can use placeholders to automatically fill in data from the form into the email, as shown in the following example images:

  • #EMAIL# Displays the email address submitted from the form data.
  • #NAME# Displays the text string submitted in the name field of the form.
  • #SUMMARY# Displays all form field data that was submitted.

IIS send mail configuration

To send email, modify the following code in in web.config:

     <!--<smtp deliveryMethod="PickupDirectoryFromIis" >-->
     <!-- Common usage is to use other network existing mail server other than
                IIS Virtual SMTP Server.
                In such cases use the commented settings below with your server
                location and authentication credentials.
   <smtp from="mail@example.com" deliveryMethod="Network">
       <network host="mail.example.com" port="25" />            

DXC send mail configuration (Azure)

Configure SendGrid with Azure: https://azure.microsoft.com/en-us/documentation/articles/sendgrid-dotnet-how-to-send-email/

Modify the following code in web.config:

   <smtp from="test@domain.com">
     <network host="smtp.sendgrid.net" password="password" userName="username" port="587" />


If you want something like "Conditional Emailing, a feature that "Send email after form submission" with condition, you should create a new Actor, inherit from SendEmailActor, and put your condition switch in the Run()

Switch (model-setting by editor)
// and make decision to sent.