CreateServerAsync now fails if you don't specify a color
We've been using this library for years, and we've never specified a color when calling CreateServerAsync. Previously, a random color would be assigned. Starting yesterday, we began randomly receiving this error: PostmarkDotNet.Exceptions.PostmarkValidationException: Please choose either Purple, Blue, Turquoise, Green, Red, Orange, Yellow, or Grey for server color.
Looking at the code, if we don't pass a color, the "color" attribute is still sent to the Postmark API, but it has a value of null. I'm guessing that used to work, but a change on the Postmark API must have disabled that.
Here's the code that's failing now:
var newServer = await postmarkClient.CreateServerAsync(newCompany.PostmarkServerName,
inboundHookUrl: $"{_postmarkWebhookUrlBase}/inbound?x-webhook-auth=1B5D4B28-C166-4392-AD01-9DC00B4B1217",
openHookUrl: $"{_postmarkWebhookUrlBase}/opened?x-webhook-auth=1B5D4B28-C166-4392-AD01-9DC00B4B1217",
deliveryHookUrl: $"{_postmarkWebhookUrlBase}/delivered?x-webhook-auth=1B5D4B28-C166-4392-AD01-9DC00B4B1217",
bounceHookUrl: $"{_postmarkWebhookUrlBase}/bounced?x-webhook-auth=1B5D4B28-C166-4392-AD01-9DC00B4B1217",
trackOpens: true,
trackLinks: LinkTrackingOptions.HtmlAndText,
smtpApiActivated: false,
enableSmtpApiErrorHooks: false
);
@matthoneycutt-sm thank you for reporting this! You are correct about the change to the API, however this change was not intentional. I'm going to be deploying a fix shortly.
@jchoca Great, thank you!
@matthoneycutt-sm fix was deployed. Let us know if it's still not working or you run into any other issues.
Just tested it out, all good! Thank you so much for the fast response.