Email internationalization and i18n localization

How to support non-English languages in SMTP email when using ASCII encoding for non-ASCII charsets. Special character punycode guide.

  • Table of contents

MailSlurp supports email sending and receiving in multiple languages. The SMTP protocol has some limitations around internationalization so see this guide for more information.

Email addresses

Email addresses must be in ASCII format. To encode an email address that is in another character set use Punycode to convert it ot ASCII.

To send an email to a recipient 张伟@example.com convert the local aspect of the email address (before the @ symbol to ASCII characters) xn--cpqy30b@example.com.

Email bodies

You can specify a character set in the send email options for all send methods. Here is an example using the Typescript client.

await inboxController.sendEmailAndConfirm({
    inboxId: senderInbox.id, sendEmailOptions: {
        from: senderInbox.emailAddress,
        replyTo: replyTo.emailAddress,
        to: [toInbox.emailAddress],
        cc: [ccInbox.emailAddress],
        bcc: [bccInbox.emailAddress],
        subject: subject,
        body: body,
        charset: "utf8"
    }
})
Email and SMS Platform
Create a free account in 3 clicks