# Email Html format

**URL:** <https://community.thunkable.com/t/email-html-format/1127731>\
**Category:** Questions about Thunkable X\
**Created:** [February 26, 2021, 8:21pm UTC](https://community.thunkable.com/t/email-html-format/1127731 "2021-02-26T20:21:26Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbcguytb](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@tbcguytb](https://community.thunkable.com/u/tbcguytb)\
**Post date:** [February 26, 2021, 8:21pm UTC](https://community.thunkable.com/t/email-html-format/1127731/1 "2021-02-26T20:21:26Z")

</div>

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.

Dave

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [February 27, 2021, 3:51am UTC](https://community.thunkable.com/t/email-html-format/1127731/2 "2021-02-27T03:51:14Z")

</div>

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

> [@Sending Emails From Thunkable App | Gmail App](https://community.thunkable.com/t/sending-emails-from-thunkable-app-gmail-app/497195):
>
> Gamil App In Thinkable-X Send emails from your gmail right from thunkable-X apps Hello everyone today i have made a new project/app in thunkable-X which allows you to send emails from gmail address from thunkable-X apps using Google APP SCRIPT. You can also use this method to verify your users by creating an email OTP verification system on your app. If you want to know the complete process with step-by-step explanation [click here](https://cttricks.com/2021/04/14/gmail-app-in-thunkable-x/) to read the complete blog. Else here is some screenshot and s…

[https://community.thunkable.com/t/how-to-send-an-email-otp/960543](https://community.thunkable.com/t/how-to-send-an-email-otp/960543)

---

<div class="post-metadata">

**Author:** ![tbcguytb](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@tbcguytb](https://community.thunkable.com/u/tbcguytb)\
**Post date:** [February 27, 2021, 2:05pm UTC](https://community.thunkable.com/t/email-html-format/1127731/3 "2021-02-27T14:05:29Z")

</div>

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.

Thanks

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [February 27, 2021, 3:23pm UTC](https://community.thunkable.com/t/email-html-format/1127731/4 "2021-02-27T15:23:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tbcguytb](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@tbcguytb](https://community.thunkable.com/u/tbcguytb)\
**Post date:** [February 27, 2021, 3:53pm UTC](https://community.thunkable.com/t/email-html-format/1127731/5 "2021-02-27T15:53:47Z")

</div>

![Capture2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/f/9f8ced9e27abc38c6a3f75b51c738cbfd5bb7537.png)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [February 27, 2021, 4:20pm UTC](https://community.thunkable.com/t/email-html-format/1127731/6 "2021-02-27T16:20:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tbcguytb](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@tbcguytb](https://community.thunkable.com/u/tbcguytb)\
**Post date:** [February 27, 2021, 4:44pm UTC](https://community.thunkable.com/t/email-html-format/1127731/7 "2021-02-27T16:44:33Z")

</div>

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.

Thanks

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [February 27, 2021, 5:29pm UTC](https://community.thunkable.com/t/email-html-format/1127731/8 "2021-02-27T17:29:32Z")

</div>

you will want the final line to read

```auto

MailApp.sendEmail("tbcguytb@gmail.com", subject, body);

```

---

<div class="post-metadata">

**Author:** ![tbcguytb](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@tbcguytb](https://community.thunkable.com/u/tbcguytb)\
**Post date:** [February 28, 2021, 4:14am UTC](https://community.thunkable.com/t/email-html-format/1127731/9 "2021-02-28T04:14:50Z")

</div>

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

 ![thunkable right](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/e/1e3393e1aac69d05b62f94c881c4ba54c1242040.png) ![Capture2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/e/6e1d83df1be48887157762dd09891ff176389a6d.png)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [February 28, 2021, 5:06am UTC](https://community.thunkable.com/t/email-html-format/1127731/10 "2021-02-28T05:06:34Z")

</div>

[https://x.thunkable.com/projectPage/603af9b085693f01bb31458a](https://x.thunkable.com/projectPage/603af9b085693f01bb31458a)

```auto

 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>'})
}

```

 ![Screen Shot 2021-02-28 at 12.08.46 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/0/707e7d31821ac512c2655c036d0db3e2683bda02.png)

find your solution within 😉

---

<div class="post-metadata">

**Author:** ![tbcguytb](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@tbcguytb](https://community.thunkable.com/u/tbcguytb)\
**Post date:** [February 28, 2021, 6:42pm UTC](https://community.thunkable.com/t/email-html-format/1127731/11 "2021-02-28T18:42:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tbcguytb](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@tbcguytb](https://community.thunkable.com/u/tbcguytb)\
**Post date:** [March 1, 2021, 7:01pm UTC](https://community.thunkable.com/t/email-html-format/1127731/12 "2021-03-01T19:01:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [March 1, 2021, 7:26pm UTC](https://community.thunkable.com/t/email-html-format/1127731/13 "2021-03-01T19:26:34Z")

</div>

You should be able to remix

---

<div class="post-metadata">

**Author:** ![tbcguytb](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@tbcguytb](https://community.thunkable.com/u/tbcguytb)\
**Post date:** [March 2, 2021, 8:27pm UTC](https://community.thunkable.com/t/email-html-format/1127731/14 "2021-03-02T20:27:46Z")

</div>

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.

Tbcguy

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [March 2, 2021, 9:29pm UTC](https://community.thunkable.com/t/email-html-format/1127731/15 "2021-03-02T21:29:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:29pm UTC](https://community.thunkable.com/t/email-html-format/1127731/16 "2024-11-08T13:29:10Z")

</div>


