Remove indent in Google Scripts sendEmail()

Viewed 31

When I use the following function to send an email in Google script, the second line has an indent that I don't want.

Here's the function:

    function AppealsListContact() {

const recipients = 'ksparks@eastern.edu' //,cde@xyz.com'
const sub = 'Pending UEPCC Appeals'
const line1 = 'Dear EU Colleague:'
const line2 = ''
const line3 = 'You have items waiting for you attention in the appeals process. Please attend to these as soon as possible.'

const body = `${line1}
              ${line2}
              ${line3}`

MailApp.sendEmail(recipients,sub,body)

}

And here's the resulting email:

"Dear EU Colleague:

               You have items waiting for you attention in the appeals 
process. Please attend to these as soon as possible."

Why is there an indent space before the message ("You have items"), and how can I remove it?

Thanks

1 Answers

Remove Indent

function AppealsListContact() {

  const recipients = 'jimesteban@jimesteban.com';
  const sub = 'Pending UEPCC Appeals';
  const line1 = 'Dear EU Colleague:';
  const line2 = ''
  const line3 = 'You have items waiting for you attention in the appeals process. Please attend to these as soon as possible.';

  const body = `${line1}\n${line2}${line3}`;

  MailApp.sendEmail(recipients, sub, body)

}
Related