Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bo Jacobsen 606 posts 2404 karma points
    Apr 24, 2019 @ 09:52
    Bo Jacobsen
    0

    How to set custom headers in Umbraco Forms mails

    Hi all.

    Is there a way to create custom email headers in Umbraco Forms?

  • Amir Khan 1287 posts 2744 karma points
    Apr 24, 2019 @ 16:57
    Amir Khan
    0

    Would creating different themes for your forms be an option? An example theme can be found here, its just html so you can do whatever you want really: Views/Partials/Forms/Emails/Example-Template.cshtml

  • Bo Jacobsen 606 posts 2404 karma points
    Apr 24, 2019 @ 17:04
    Bo Jacobsen
    0

    Hi Amir.

    I do not se how i can set headers in the .cshtml. Am i missing something?

    I was thinking that there might be a way to hook into the mailmessage, like there is in NewsletterStudio. But i can't find any documentation on it at https://our.umbraco.com/documentation/Add-ons/UmbracoForms/Developer/

    Like?

    public class AddCustomMailHeaders : UmbracoFormsHook
    {
        public override void ProcessSomething(MailMessage mailMessage)
        {
           mailMessage.Headers.Add("Custom", "Header");
        }
    }
    
  • Bo Jacobsen 606 posts 2404 karma points
    Apr 25, 2019 @ 13:20
    Bo Jacobsen
    0

    I was told by Umbraco Support, that this is not something that comes out of the box with Umbraco Forms.

    So for you to achieve this what you need to do is to create a custom workflow type. You can follow the following documentation on how to create a custom workflow in Umbraco. https://our.umbraco.com/documentation/Add-ons/umbracoforms/developer/extending/adding-a-workflowtype

    I made a request for it here https://github.com/umbraco/Umbraco.Forms.Issues/issues/151

Please Sign in or register to post replies

Write your reply to:

Draft