Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending email failes if email contain special character #463

Closed
amandruby opened this issue Jun 12, 2021 · 3 comments · May be fixed by #467
Closed

Sending email failes if email contain special character #463

amandruby opened this issue Jun 12, 2021 · 3 comments · May be fixed by #467

Comments

@amandruby
Copy link

Hello,
I have created an application in which some users have email which contains special characters, and when we deliver mail to those users it fails with error message : -

*** Error receiving message: {:sender=>"<[email protected]>", :recipients=>["<som\xC3\[email protected]>"], :source=>"Date: Sat, 12 Jun 2021 15:39:44 +0530\r\nFrom: <[email protected]>\r\nTo: [email protected]\r\nMessage-ID: <*************>\r\nSubject: "xyz"}

    Exception: "\xC3" from ASCII-8BIT to UTF-8
@sj26
Copy link
Owner

sj26 commented Jul 15, 2021

MailCatcher does not support utf8 or 8bitmime, it follows the original smtp standard which is ascii (7 bit) only. Your smtp or mail libraries are not creating correctly formatted messages. What are you using?

@sj26 sj26 linked a pull request Jul 15, 2021 that will close this issue
@sj26
Copy link
Owner

sj26 commented Jul 15, 2021

This should be fixed by #467.

@sj26
Copy link
Owner

sj26 commented Jul 17, 2021

Your SMTP client and mail library should be correctly encoding mail message bodies to only contain 7-bit ASCII characters, per RFC5321. Wider characters can be supplied in smtp by using quoted strings, and in mail bodies by using encodings like quoted printable, and most smtp clients and mail libraries will handle this transparently. I suggest checking that your SMTP client and mail library are conforming to standards. Many SMTP servers are quite lenient with these sorts of issues, so you might be fine. But you might also have trouble sending email over the wider Internet.

@sj26 sj26 closed this as completed Jul 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants