Hello, I am using Microsoft Graph Mail.Send API to send emails. How to create my custom email template as webblock and get the HTML code so that I can pass it to the API as content. 

Please can someone guide me on this?

Thanks,

Karthik

Hi Karthik,

How does MS Graph expect the e-mail? As an HTML text?

Kilian Hekhuis wrote:

Hi Karthik,

How does MS Graph expect the e-mail? As an HTML text?

Hi Kilian,

I am using MS Graph's Sendmail API to send emails, where I can send content in HTML format. Please see the example below:

"body": {
      "contentType": "HTML",
      "content": "The group represents Nevada."
    },

Where "content" can be in HTML format? I would like to know how I can get HTML from an email template or webblock so I can generate email body in runtime and send via Graph API.

Thanks

I don't think you can get the HTML from an E-mail Screen. You can however get the HTML from a normal Screen, using GetRequest_Submit from the HTTPRequestHandler System Extension. Note however, that E-mail Screens are specfically prepared for e-mail sending (like using inline CSS), so sending a normal Screen as e-mail might not work too well.

Kilian Hekhuis wrote:

I don't think you can get the HTML from an E-mail Screen. You can however get the HTML from a normal Screen, using GetRequest_Submit from the HTTPRequestHandler System Extension. Note however, that E-mail Screens are specfically prepared for e-mail sending (like using inline CSS), so sending a normal Screen as e-mail might not work too well.

Ahh ok. It would be nice if we can get HTML of an email in runtime. Thanks for your response.