caronc / apprise

Apprise - Push Notifications that work with just about every platform!
https://hub.docker.com/r/caronc/apprise
BSD 2-Clause "Simplified" License
10.91k stars 384 forks source link

Send email body as html #1046

Closed grkntkn closed 5 months ago

grkntkn commented 5 months ago

Hi,

I want to send email as html body with notification service, but I didn't understand.. how to send the body_format or the notify_format text value in the apprise api.

Ps: I use this in .Net project and post like this

protected async Task Post(string uri, NotificationDto notificationDto) { try { using var client = new HttpClient(); client.BaseAddress = new Uri(NotificationSettings.Apprise.BaseUrl); var res = await client.PostAsJsonAsync(uri, notificationDto); ...

uri is :_sendGridSettings.BaseUrl + emails.. notificationDto has : title, body, urls string params

Should I add new parameter to NotificationDto? Like bodyFormat = "html" etc.

caronc commented 5 months ago

During the post, you do set the format variable to what is being passed in as (input format). Set to html, text, or markdown.

By default, all emails are sent as html, so nothing further is required.

grkntkn commented 5 months ago

Hey,

I fix this issue.. I set the format variable in post request model and mail body show as html template.

Thank you for your support.