Hi All,
what should we use for SMTPMail.CreateMessage in cloud bc?
it was said marked for removal
Hi All,
what should we use for SMTPMail.CreateMessage in cloud bc?
it was said marked for removal
Hi, so, there are 2 CreateMessage functions :)?
Can you try to select the right one?
Sorry, it’s just so hilarious…
which one is the right one?
there is only 1 createmessage
There are two CreateMessage procedures in the SMTP Mail codenit, each one with different parameters. It’s called overloading, you can read about that here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods/devenv-overload-method. The system knows which one you want to use because of the parameters that you are using. You need to change the call to use the parameters of the new version of that function.
Here is the obsolete signature:
procedure CreateMessage(FromName: Text; FromAddress: Text; Recipient: Text; Subject: Text; Body: Text; HtmlFormatted: Boolean)
And here is the new one:
procedure CreateMessage(FromName: Text; FromAddress: Text; Recipients: List of [Text]; Subject: Text; Body: Text)
Hi Daniel,
thanks for the answer.
by the way any idea for → Recipients: List of [Text]; ??
i never use this before.