0

I am using Postmark to send emails, it work well. i want the ability to set the preview of the email

enter image description here

The code that i am using is the following:

 var message = new PostmarkMessage()
        {
            To = EmailTo, 
            From = "do-not-reply@test.com",
            TrackOpens = true,
            Subject = Subject, 
            Cc = CcEmail,
            Bcc = bccEmail, 
            TextBody = EmailBody,
            HtmlBody = EmailBody,
            Tag = "test", 
            Headers = new HeaderCollection { new MailHeader("X-CUSTOM-HEADER","Header content") }, 
        };

        var postClient = new PostmarkClient(MainConfig.PostmarkKey);

        try
        {
            return await postClient.SendMessageAsync(message);
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.Message);
            return null;
        }

I am not sure what i am missing to enable the preview.

wandos
  • 1,581
  • 2
  • 20
  • 39

1 Answers1

0

I found the solution thanks to the postmark team, https://postmarkapp.com/guides/best-practices-for-broadcast-sending#include-preheader-text

wandos
  • 1,581
  • 2
  • 20
  • 39