Hi Pete,
David is correct - all emails you send via DynamicsGP are going to go out via the MSGraph interface added to DynamicsGP as a Visual Studio add-in. If you wanted to use Postmark, you would need to hook into the MSGraphEmailSendEmail form procedure on the syEmailObj, and prevent Microsoft's VS add-in from firing. This would mean you take over ALL emailing in DynamicsGP , including emails that other add-in products send through DynamicsGP , as they end up going out through this point as well most likely. On the upside, all the work of setting and validating the various parameters has been done for you. On the downside, you are limited to whatever email functionality DynamicsGP supports. Also know that this endpoint has changed in the last three releases of DynamicsGP , so your integration may need to change depending on the version of DynamicsGP your customer is on and change again when they upgrade.
This is the parameter block for the 18.6 version of MSGraphEmailSendEmail:
in text toMailaddress;
in text ccMailaddress;
in text bccMailaddress;
in string Subject;
in text Body;
in integer BodyContentType;
in text Attachmentfilepaths;
in text Attachmentfilenames;{This is added for workflow doc attach where file name on disk will be different}
out string errorcode;
out string errormessage;
in text ReplyToMailaddress; {93741}
in boolean UseSharedMailbox; {93996}
in boolean SuppressExceptionWarning;
Know that the Attachmentfilepaths and filenames are separated by pipe characters (|), and in earlier versions of this, only supported a small number of attachments as the text field was initially a string, and then a 4000 character text field. Now it is 32,000 I think. Still, when you have files that are stored in the local temp folder, the paths to each one can easily be over a hundred characters, so it goes fast. You also will need to take care of authentication in your code. Note, there is no who the message is from at this point in the code, so you would need to figure that out. The ReplyToMailAddress is the shared mailbox name if the UseSharedMailbox param is true, so that may be useful.
I think it can be done, as long as you can accept the trade offs and responsibility.
Paul