Email Html format

Can I send an email in html format to pretty it up a bit. I have a form with data and I am using the share component to open up the native email app.


Yes! You’ll need to use a google script! Have you searched the forum on this topic yet?

1 Like

Hi jared, i will try again with the google script. I had no luck whatsoever the first try. I used everything from above. I was getting the errors when running the script from within appscript like you said would happen. but I was getting no response in the app. I will make a copy of my app and try again and report back.


I use this method to send emails in an app daily. It definitely works. Maybe share your actual code from the gscript.


You have not declared the message parameter in send mail().

You declared body but used message.

I advised to use a variable other than body because of internal representation conflict.


I looked at that 20 times and didn’t see it. A set of fresh eyes helps sometimes… I used body initially then changed it to message. Just forgot to change the variable. I will fix and try again.


1 Like

you will want the final line to read

MailApp.sendEmail("", subject, body);

still nothing. here is my screener of the right sided of the designer…in case i am supposed to enter values. I assume not as we are scripting them. Also my block diagram is included

 function doPost(e) {
  var body = e.parameters.message;
  var subject = e.parameters.subject;
  var who = e.parameters.who;
  GmailApp.sendEmail(who, subject, body, {htmlBody: '<html><body>' + body + '</body></html>'})

find your solution within :wink:

1 Like

wow, that’s neat. I wish I had looked at this software more seriously when it first came out. I will give this a try. Is the html body above just a text field auto populated with some html. But before i try this, i have to get the app to send any email. I’m getting a response code of 200, i’ve enabled the api. The mail never shows up…very frustrating. See in my case the ‘who’ in your appscript is static…always to the same email. Clients are sending mobile orders. I want to get this contact form working before i do the order form.

Jared, can i remix that link you sent. I would like to pick it apart so I understand what is going on.

You should be able to remix

So I looked at what you did for about 5 minutes before it hit me, of course use a webviewer. So I created two forms and uploaded to host and voila it works. Thanks jared. One question is there a way through blocks, that when I enter the webviewer, it hides some other items like the image at the top of my screen. This way i have more real estate on my screen. When the keyboard pops up, it covers a lot of the form.


I’d have to check your setup, but i’d say yes if the image is a thunkable image component