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 256 posts 1195 karma points
    Apr 24, 2019 @ 09:57
    Bo Jacobsen
    0

    How to set custom headers newsletter?

    Hi.

    Is there a way to set custom headers in the newsletter?

  • Markus Johansson 1603 posts 4508 karma points
    Apr 24, 2019 @ 12:14
    Markus Johansson
    100

    Hi!

    Without knowing what kind of header you are trying to set I think you should be able to do it using a render task.

    Have a look here:

    https://www.newsletterstudio.org/help/develop-with-newsletter-studio/control-content-with-render-tasks/

  • Bo Jacobsen 256 posts 1195 karma points
    Apr 24, 2019 @ 16:52
    Bo Jacobsen
    0

    Hi Markus.

    Thanks for answering. It's exactly what i need in order to make a custom mailmessage header.

    public class AddCustomMailHeaders : RenderTask
    {
        .....
        public override void ProcessUniqItem(RenderResult renderResult, RenderTaskUniqItemParameters parameters)
        {
           parameters.MailMessage.Headers.Add("Custom", "Header");
        }
    }
    
  • Markus Johansson 1603 posts 4508 karma points
    Apr 25, 2019 @ 07:15
    Markus Johansson
    0

    Great news!

    Just let me know if you have any other questions or needs =D

    // m

Please Sign in or register to post replies

Write your reply to:

Draft