Sendgrid not sending text to new line

ServerSideSkittles picture ServerSideSkittles · Nov 6, 2015 · Viewed 7.6k times · Source

I am using sendgrid api with nodejs and for some reason the emails are sending but not adding new lines. I've used and also \n but no luck. Any idea what is wrong?

Here is the code I am using

var email = {
      to: '[email protected]',
      from: '[email protected]',
      subject: 'Membership',
      text: 'Please view in html',
      html: 'Hello there!,</br>\n\n' +
      'Please click on the following link, or paste this into your browser to complete the process:\n\n' +
      'Welcome and thanks for joining.\n\n' +
      '</br>Your details we have are\n\n' +
      '</br> Name: ' + user + '\n\n' + '</br> Telephone number: ' + number + '</br> email: ' + email + '</br>'
      };

Answer

shikhar bansal picture shikhar bansal · Nov 6, 2015

In places of </br> and \n Use <br>