Copied to clipboard

Flag this post as spam?

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


  • OleP 67 posts 276 karma points
    Sep 20, 2018 @ 07:08
    OleP
    0

    Custom headers in Umbraco Forms

    Hi our, I'm trying to use a Mandrill subaccount when sending emails from our Umbraco Cloud site. The main account is set up correctly in web.config like this:

     <system.net>
        <mailSettings>
          <smtp>
            <network host="smtp.mandrillapp.com" port="587" userName="{USERNAME}" password="{PASSWORD}" />
          </smtp>
        </mailSettings>
      </system.net>
    

    To use the subaccount, I need to add a custom header to all messages sent from the site. After some seaching around, I can see that it has to be added to the MailMessage like this message.Headers.Add("X-MC-Subaccount", "{SUBACCOUNT-NAME}");.

    How can I achieve this, when I don't have access to the code where the mail is sent? I presume it's hidden in the Umbraco.Forms dlls.

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft