Hi all,
We are switching from SMTP to the Microsoft Graph API for sending emails from OutSystems apps.
Sending the email via the API is working fine but how is everyone designing the HTML body content for emails?
We currently use blocks inside traditional web apps for generating emails as it is easier to format the content to render well for Outlook desktop.
We have tried a GetRequest_Submit to extract the HTML content from a block on a screen without success. It does not return the HTML even on an anonymous screen.
The email content is tabular in nature and pulled from db tables depending on user selection which makes it challenging to write the HTML by hand.
Any tips would be much appreciated.
If you are trying to convert a webblock to HTML, you can try using the HtmlRenderer extension, it provides an action RenderWebBlock which takes in an espace name, webflow name, webblock name and an input parameters object and will return the generated HTML.
Input parameters is an Object which is made using the AddWebBlockInputParameter action and may look something like:
AddWebBlockInputParameter("IssueItem", ToObject(JiraJobToIssueItem(JiraJob)), AddWebBlockInputParameter("TransitionFrom", ToObject(From), AddWebBlockInputParameter("TransitionTo", ToObject(To), NullObject())))
if you have multiple input parameters.
Whilst i've not had issues with this extension, it is not recommended to rely on it.