-
Notifications
You must be signed in to change notification settings - Fork 17
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
Special chars in From and Subject #36
Comments
Could you provide a minimal code example? |
Some mail clients now show ??? instead of import { SMTPClient } from "https://deno.land/x/denomailer/mod.ts";
const client = new SMTPClient({
connection: {
hostname: 'smtp.mailbox.org',
port: 465,
tls: true,
auth: {
username: 'xxx',
password: 'xxx',
},
},
});
console.log('>>>send' , await client.send({
from: 'Önsen Stärebrü <oensen.staerebrue@example.com>',
to: 'Inga Wäregwö <inga.waeregwoe@example.com>',
subject: 'Köttbullar recipe by Önsen Stärebrü',
html: '<html><head></head><body>This <b>is</b> a test.</body></html>',
}));
client.close(); It does not affect the html since there any multipart gets a content-type with utf header. |
You can try import { quotedPrintableEncode } from "https://deno.land/x/denomailer/config/mail/encoding.ts";
const newSubject = quotedPrintableEncode(oldSubject) might work. |
No, that looks like this: They seem to wrap it inside |
It looks like you can do const newSubject = `=?utf-8?Q?${quotedPrintableEncode(oldSubject)}?=` I can't reproduce the error with 3 different SMTP-Servers so not sure what to expect... |
I created a PR that implements the above fix. (#37) You can try it by importing denomailer from |
Yes, with the new mod.ts file it works out of the box. 👏👏👏 Problem is not on the sending side, it is with the email client you open the mail. Some dont seem to assume the mail head is utf8. |
It semes to work (before this fix) with non spec-compliant-clients so this is an important change! |
Released in version 1.3.0 thanks a lot for the help! |
Hi @mathe42 , When I have ascii chars in my subject it shows weird tags in my email Is it linked ? |
When you use special chars in subject or from in some email clients they are not displayed properly.
I checked an email send with rainloop, where it works, and they seem to escape words containing special chars like this:
"=?utf-8?B?w5ZHS1YgS8Okcm50ZW4=?="
Meanwhile is there an escape function to archive this right now? When i copied that string into my send function it was displayed correctly.
The text was updated successfully, but these errors were encountered: