I have a GAS script that sends automated emails and would like to include a couple of emojis. I\'ve tried using shortcodes and copying/pasting, but nothing so far seems to h
The easiest complete answer that also works with SMS recipients is this:
function testNewMail() {
MailApp.sendEmail({
to: "yourphonenumbergoeshere@mymetropcs.com",
subject: "Logos",
htmlBody: "
I tried to copy the emoji (https://www.emojicopy.com/) and paste it directly into the script editor:
and after sending the email I received it in my mailbox:
Edit:
Be careful that some emoji are one character length (like the star) but other are 2 characters (like the smile) for those with 2 characters you can think of writing immediately after the smile but instead you are writing inside the smile so you break it therefore turns in question mark.
If you try to run this code, you will see that the first has length 2 and the second one has length 1:
If you try to move the pointer (in the apps script editor) on those 2 emoticons, from before to after the emoticon, you will see that in the case of the star just one step but for the smile you need 2 steps.
You want to send an email with HTML body including the emoji. If my understanding is correct, how about this modification?
Unfortunately, GmailApp
cannot use the recent emoji characters. At GmailApp
MailApp
can use all versions of emoji.
"⭐" is Unicode 5.1. But "