katzer / cordova-plugin-email-composer

Edit and send email messages
Apache License 2.0
345 stars 336 forks source link

How to add Line break to the email body ? #345

Closed Thirus11 closed 2 years ago

Thirus11 commented 4 years ago

Dear Katzer,

Can you help me on the below requirement

cordova.plugins.email.open({ subject: oPDFEMailModel.getProperty("/EmailSubject"), to: arrayEmail, cc: arrayCC, body: oPDFEMailModel.getProperty("/EmailMessage"), attachments: 'base64:attachment.pdf//' + base64 });

rmeske commented 4 years ago

@Thirus11 ,

It depends on what platform you are building for. The following handles, browser, Android, and iOS.

let lineBreak = this.common.isApp ? '<br>' : (this.platform.is('android') ? `%0D%0A%0D%0A` : `%0D%0A`);
jfoclpf commented 2 years ago

@rmeske <br> also works as line breaks with android and iOS, I use it and it works, at least it works on my side with isHtml: true, although html is not rendered