0

I have a working header, below, which adds SMTP headers to outgoing emails:

var header = new[]{"X-MC-Template:RegisterTemplate", "Reply-To:myname@mail.com"};

I want to create a similar variable using the below code:

var tag = new[]{"X-MC-MergeVars", "var1", "hello1"};

and my webmail send function is as follows:

    WebMail.Send(to: customerEmail,
    subject: "test email",
    body: "email body",
    additionalHeaders: header, tag

but I don't know how to format it to work? My syntax is wrong, but I've tried many variations with now luck.

halfer
  • 19,824
  • 17
  • 99
  • 186
Gavin5511
  • 791
  • 5
  • 31
  • Sorry, completely forgot to add a very important part, this needs to be a JSON collection – Gavin5511 Oct 01 '13 at 22:08
  • I don't know the answer to this question, as I've never needed to add SMTP headers to emails before, but it would probably be helpful if you could add a little more info/examples to your question. – VoidKing Oct 03 '13 at 13:44
  • You know you are missing a closing parenthesis to your `WebMail.Send()` method in your code above, right? – VoidKing Oct 09 '13 at 13:11
  • yeah, that's just a copy and paste error, it's not missing in my code :) well caught though – Gavin5511 Oct 09 '13 at 13:32
  • Okay, just checking, just in case. – VoidKing Oct 09 '13 at 13:35

0 Answers0