4

If a user has created a draft in the gmail web UI that contains Unicode characters in the subject, calling Draft.Send seems to not handle these unicode characters correctly.

You can test this by:

  1. Create a draft in gmail with the subject "snowman ☃"
  2. Call drafts.list to get the draft id in the API explorer (https://developers.google.com/gmail/api/v1/reference/users/drafts/list#try-it)
  3. Call Drafts.send using that draft id in the api explorer (https://developers.google.com/gmail/api/v1/reference/users/drafts/send#try-it)
  4. Goto Gmail web ui, then the sent folder, and see that the email was sent with a subject of "snowman: ☃"

Any workarounds for this?

aloo
  • 5,331
  • 7
  • 55
  • 94

2 Answers2

0

Using NodeJs, here is what I got it working for sending Unicode Characters along with emoji signs. Details in this comment

pjoshi
  • 249
  • 3
  • 7
-1

Email messages can only contain ASCII characters. See RFC 5335. Did you try encoding the subject?

Subject: =?utf-8?b?c25vd21hbiDimIM=?=

You didn't mention what language you're using but most have a library for performing the encoding.

Community
  • 1
  • 1
Jay Lee
  • 13,415
  • 3
  • 28
  • 59
  • I'm actually suggesting this is a bug in their api. If you look at the instruction it says to just use the API explorer directly. Also, the reason I'm asking this question is because I'm actually sending a draft the user has created themselves in their account so I have no opportunity to encode the subject, I'm just calling Drafts.send – aloo Jul 07 '14 at 18:27