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

Add quoted-printable decoding to smtp server #719

Merged
merged 1 commit into from
May 9, 2023

Conversation

Aerion
Copy link
Contributor

@Aerion Aerion commented May 8, 2023

Some e-mails are sent using quoted-printable encoding [0], resulting in notifications with weird characters.

This commit adds support for this encoding, resulting in the following:

Before

A
=3D=3D=3D=3D=3D
B
=3D=3D=3D=3D=3D
C

After

A
=====
B
=====
C

[0] https://www.rfc-editor.org/rfc/rfc2045.html

Some e-mails are sent using quoted-printable encoding [0], resulting in
notifications with weird characters.

This commit adds support for this encoding, resulting in the following:

**Before**
```
A
=3D=3D=3D=3D=3D
B
=3D=3D=3D=3D=3D
C
```

**After**
```
A
=====
B
=====
C
```

[0] https://www.rfc-editor.org/rfc/rfc2045.html
@binwiederhier
Copy link
Owner

That's a good catch. I was under the impression that quoted-printable is handled automatically, but apparently that only happens for multipart parts (see https://pkg.go.dev/mime/multipart#Reader.NextPart).

@binwiederhier binwiederhier merged commit 931d3ce into binwiederhier:main May 9, 2023
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 this pull request may close these issues.

2 participants