mailMessage SetExtendedProperty Exchange Mail Deferred Delivery

I’m looking to replicate this C# code within the xaml, Am I able to assign/ set the extended property / Send time of a mailMessage to be sent by Exchange?

// Identify when the email message will be sent and delivered. The email message is delivered after the next line executes.
if (deferredDeliveryTime != DateTime.MinValue && deferredDeliveryTime >= DateTime.Now)
{
ExtendedPropertyDefinition PR_DEFERRED_SEND_TIME = new ExtendedPropertyDefinition(16367, MapiPropertyType.SystemTime);
string sendTime = deferredDeliveryTime.ToString(“o”); // use ISO 8601 format for datetime
message.SetExtendedProperty(PR_DEFERRED_SEND_TIME, sendTime);
}

Hi,

If you want to use SendExchangeMailMessage activity etc, it’s difficult to set ExtendedPropertyDefinition.
It might be possible to set it if you write all logic regarding sending mail for exchange as workflow and/or InvokeCode activity.

Regards,

I have the necessary code in C# but it is not my area of expertise & it has been unstable previously

@Yoichi I managed to identify the instability and now have this working inside C# /Invoke code within a Library, my issue with running that C# code was caused by not having the imported namespaces in the local .xaml where the library was called as well.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.