Is it possible to use emoji in a source email?

0

I would like to use the following:

ses.sendBulkTemplatedEmail(
  {
    Source: "\"&#128512; Example Name\" <test@example.com>",
    // ...
  }
  //...
)

To send an email with an emoji in the source email address. However, these emails do not seem to be sent despite the same email without the emoji being delivered as expected. Is there another step I need to take to make this work? Is it even possible to do this?

Thanks for the help!

3개 답변
0

In addition to the above, there might be some buggy behaviour. I don't seem to see an error when triggering the email with the emoji in the source email address, nor do I get a rendering failure. Other emails arrive in the test email account and nothing is landing in a spam folder. So, unless I am missing something, it appears this is silently failing.

beepbop
답변함 4년 전
0

Hi beepbop,

In order to use an emoji in the sender name, you have to encode it using MIME encoded-word syntax. You can find more information in our documentation at https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html#send-email-mime-encoding-headers.

MIME encoded-word syntax uses the following format:

=?charset?encoding?encoded-text?=

In your example, you'd use the following as the Source value:

source: "=?utf-8?B?8J+YgA==?= Example Name <test@example.com>"

Breaking this down:

  • The 'utf-8' part indicates that we want to use 8-bit Unicode character encoding.
  • The 'B' indicates that we're encoding the characters using Base64 (tip: you can use websites such as https://www.base64encode.org/ to quickly Base64 encode your emoji).
  • The '8J+YgA==' part is the  emoji converted into Base64 format.

Hope this helps. Thanks for using Amazon SES!

Brent @ AWS

AWS
답변함 4년 전
0

Thank you for your answer Brent, it works!

beepbop
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠