Fix email formatting: convert newlines to <br> for FreeScout HTML body
This commit is contained in:
parent
3763fc0b15
commit
e92f1f89a8
1 changed files with 3 additions and 1 deletions
|
|
@ -123,10 +123,12 @@ async function cmdReply(args) {
|
|||
process.exit(1);
|
||||
}
|
||||
|
||||
// FreeScout body field is HTML — convert plain text newlines to <br> tags
|
||||
const htmlBody = message.replace(/\n/g, '<br>\n');
|
||||
const body = {
|
||||
type: draft ? 'note' : 'message',
|
||||
text: message,
|
||||
body: message,
|
||||
body: htmlBody,
|
||||
user: 6,
|
||||
status: status || (draft ? undefined : 'active'),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue