Skip to content

Commit

Permalink
v6.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Jan 27, 2023
1 parent 01840df commit e3cc93a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 6.9.1 2023-01-27

- Fix base64 encoding for emoji bytes in encoded words

## 6.9.0 2023-01-12

- Do not throw if failed to resolve IPv4 addresses
Expand Down
6 changes: 6 additions & 0 deletions lib/mime-funcs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ module.exports = {
let lpart = '';
for (let i = 0, len = encodedStr.length; i < len; i++) {
let chr = encodedStr.charAt(i);

if (/[\ud83c\ud83d\ud83e]/.test(chr) && i < len - 1) {
// composite emoji byte, so add the next byte as well
chr += encodedStr.charAt(++i);
}

// check if we can add this character to the existing string
// without breaking byte length limit
if (Buffer.byteLength(lpart + chr) <= maxLength || i === 0) {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodemailer",
"version": "6.9.0",
"version": "6.9.1",
"description": "Easy as cake e-mail sending from your Node.js applications",
"main": "lib/nodemailer.js",
"scripts": {
Expand All @@ -20,8 +20,8 @@
},
"homepage": "https://nodemailer.com/",
"devDependencies": {
"@aws-sdk/client-ses": "3.245.0",
"aws-sdk": "2.1293.0",
"@aws-sdk/client-ses": "3.259.0",
"aws-sdk": "2.1303.0",
"bunyan": "1.8.15",
"chai": "4.3.7",
"eslint-config-nodemailer": "1.2.0",
Expand Down

0 comments on commit e3cc93a

Please sign in to comment.