1
votes

I was trying to send email using send button. Inside the save button I have added some code to declare : to, subject and email body. I want to make the email body a bit nice, by adding some html like h1/h5, p. etc

I have tried to added the html tags like h1/h2 etc or p.. but those part also pops up in the email.

"<html><body><h1>Description:</h1></body></html>\n\t\t" + widgets.Objective.value

1

1 Answers

0
votes

The reason that is probably happening is because when you are sending the email, you are not doing it correctly. The code you have provided is not really helpful, so I'm only guessing that your logic to send the email on the server side is not the way it should be. Take as a reference the following code snippet:

  MailApp.sendEmail({
    to: "[email protected]",
    subject: "Test Email",
    htmlBody: "<html><body><h1>Description:</h1></body></html>\n\t\t"
  });

Reference: https://developers.google.com/apps-script/reference/mail/mail-app#sendEmail(Object)

P.S. If this answer is not helpful, please considering editing your question and please include your server side code as well since the current way your question is being asked leaves too much questions flying around.