I've made a function that sends a merge template as an attachment in an email. My problem is that I can't have newlines or breaks in the message of the email. This is the code:
- email_message = "Hello, " + conventionRecord.get("Name") + ", \n <br>"; // neither work
email_message = email_message + "Here's the attachment. Have a good day.";
output_settings.put("message",email_message);
output_settings.put("subject","Invoice Data");
output_settings.put("output_format","pdf");
output_settings.put("recipient_email",conventionRecord.get("Email"));
info output_settings;
optional_settings = Map();
attachment_name = "Convenție_generată_" + today.toString() + conventionRecord.get("Name");
optional_settings.put("attachment_name",attachment_name);
response = zoho.writer.v2.mergeAndSend(convention_id,merge_detail,output_settings,optional_settings,"zohooauthwriter");
info response;
The function resolves without issue and the mail is sent:
How can I have newlines in the body of the email message?