Best Answer

POST /manage/v1/user/send_mail Ignores Formatting

  • 19 September 2023
  • 3 replies
  • 27 views

Userlevel 2
Badge +1

Hello all,

I am making use of the POST /manage/v1/user/send_mail User API operation with the following request body:

{
"id_user":xxxxx ,
"subject": "Test",
"message": "Hello\nWorld\n"
}

The email is send successfully to the user but all formatting (in this case the \n characters) are ignored!  This is what the email looks like: 

Any idea how (or if it is possible) to preserve the formatting?

 

Cheers,

George

icon

Best answer by alekwo 19 September 2023, 19:07

View original

3 replies

Userlevel 7
Badge +1

@GeorgeK did you try to use HTML formatting… “Hello<br>World<br>”?

Userlevel 2
Badge +1

OMG!  It never crossed my mind.   Thank you so much @alekwo

 

To Docebo:  Please provide better API docs!

Userlevel 7
Badge +3

This API endpoint always amuses me for some reason. I always think it does more than it does, then remember and just end up using a mail service instead :)

Reply