Skip to content

Commit

Permalink
fix(message-upload): improvements regarding empty From header
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Feb 12, 2024
1 parent 6dc82b0 commit 45df0fd
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 51 deletions.
1 change: 1 addition & 0 deletions .ncurc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
'nanoid',
'gettext-parser',
'xgettext-template',
'chai',

// no support for Node 16
'marked',
Expand Down
7 changes: 7 additions & 0 deletions lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -2938,6 +2938,13 @@ class Connection {

let accountData = await this.accountObject.loadAccountData();

if (!data.from && data.reference && data.reference.action) {
data.from = {
name: accountData.name,
address: accountData.email
};
}

let inlineOptions = {
locale: data.locale || accountData.locale || (await settings.get('locale')),
tz: data.tz || accountData.tz || (await settings.get('timezone'))
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
"@postalsys/templates": "1.0.7",
"ace-builds": "1.32.6",
"base32.js": "0.1.0",
"bull-arena": "4.1.1",
"bullmq": "5.1.9",
"bull-arena": "4.2.0",
"bullmq": "5.1.10",
"compare-versions": "6.1.0",
"dotenv": "16.4.1",
"dotenv": "16.4.3",
"encoding-japanese": "2.0.0",
"exponential-backoff": "3.1.1",
"express": "4.18.2",
Expand All @@ -75,7 +75,7 @@
"humanize": "0.0.9",
"ical.js": "1.5.0",
"iconv-lite": "0.6.3",
"imapflow": "1.0.150",
"imapflow": "1.0.152",
"ioredfour": "1.3.0-ioredis-07",
"ioredis": "5.3.2",
"ipaddr.js": "2.1.0",
Expand All @@ -101,7 +101,7 @@
"punycode": "2.3.1",
"qrcode": "1.5.3",
"smtp-server": "3.13.2",
"socks": "2.7.1",
"socks": "2.7.3",
"speakeasy": "2.0.0",
"startbootstrap-sb-admin-2": "3.3.7",
"timezones-list": "3.0.3",
Expand All @@ -111,7 +111,7 @@
"xml2js": "0.6.2"
},
"devDependencies": {
"chai": "5.0.3",
"chai": "4.3.10",
"eerawlog": "1.5.1",
"eslint": "8.56.0",
"eslint-config-nodemailer": "1.2.0",
Expand All @@ -120,7 +120,7 @@
"grunt-cli": "1.4.3",
"grunt-eslint": "24.3.0",
"jsxgettext": "0.11.0",
"npm-check-updates": "16.14.14",
"npm-check-updates": "16.14.15",
"pino-pretty": "10.3.1",
"pkg": "5.8.1",
"resedit": "2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sbom.json

Large diffs are not rendered by default.

70 changes: 40 additions & 30 deletions static/licenses.html
Original file line number Diff line number Diff line change
Expand Up @@ -1656,7 +1656,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/assertion-error">assertion-error</a></td>
<td>2.0.1</td>
<td>1.1.0</td>
<td>MIT</td>
<td>Jake Luer</td>
<td>jake@qualiancy.com</td>
Expand Down Expand Up @@ -1906,7 +1906,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/bull-arena">bull-arena</a></td>
<td>4.1.1</td>
<td>4.2.0</td>
<td>MIT</td>
<td>Mixmax</td>
<td>hello@mixmax.com</td>
Expand All @@ -1916,7 +1916,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/bullmq">bullmq</a></td>
<td>5.1.9</td>
<td>5.1.10</td>
<td>MIT</td>
<td>Taskforce.sh Inc.</td>
<td></td>
Expand Down Expand Up @@ -2046,7 +2046,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/chai">chai</a></td>
<td>5.0.3</td>
<td>4.3.10</td>
<td>MIT</td>
<td>Jake Luer</td>
<td>jake@alogicalparadox.com</td>
Expand Down Expand Up @@ -2096,7 +2096,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/check-error">check-error</a></td>
<td>2.0.0</td>
<td>1.0.3</td>
<td>MIT</td>
<td>Jake Luer</td>
<td>jake@alogicalparadox.com</td>
Expand Down Expand Up @@ -2636,7 +2636,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/deep-eql">deep-eql</a></td>
<td>5.0.1</td>
<td>4.1.3</td>
<td>MIT</td>
<td>Jake Luer</td>
<td>jake@alogicalparadox.com</td>
Expand Down Expand Up @@ -2686,7 +2686,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/define-data-property">define-data-property</a></td>
<td>1.1.2</td>
<td>1.1.3</td>
<td>MIT</td>
<td>Jordan Harband</td>
<td>ljharb@gmail.com</td>
Expand Down Expand Up @@ -2936,7 +2936,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/dotenv">dotenv</a></td>
<td>16.4.1</td>
<td>16.4.3</td>
<td>BSD-2-Clause</td>
<td></td>
<td></td>
Expand Down Expand Up @@ -4335,7 +4335,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/hasown">hasown</a></td>
<td>2.0.0</td>
<td>2.0.1</td>
<td>MIT</td>
<td>Jordan Harband</td>
<td>ljharb@gmail.com</td>
Expand Down Expand Up @@ -4615,7 +4615,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/imapflow">imapflow</a></td>
<td>1.0.150</td>
<td>1.0.152</td>
<td>MIT</td>
<td>Postal Systems O&#xDC;</td>
<td></td>
Expand Down Expand Up @@ -4784,13 +4784,13 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</td
</tr>
<tr>
<td><a href="https://npmjs.com/package/ip">ip</a></td>
<td>2.0.0</td>
<td><a href="https://npmjs.com/package/ip-address">ip-address</a></td>
<td>9.0.5</td>
<td>MIT</td>
<td>Fedor Indutny</td>
<td>fedor@indutny.com</td>
<td>Beau Gunderson</td>
<td>beau@beaugunderson.com</td>
<td>
<a href="https://github.com/indutny/node-ip">github.com/indutny/node-ip</a>
<a href="https://github.com/beaugunderson/ip-address">github.com/beaugunderson/ip-address</a>
</td
</tr>
<tr>
Expand Down Expand Up @@ -5194,6 +5194,16 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</td
</tr>
<tr>
<td><a href="https://npmjs.com/package/jsbn">jsbn</a></td>
<td>1.1.0</td>
<td>MIT</td>
<td>Tom Wu</td>
<td></td>
<td>
<a href="https://github.com/andyperlitch/jsbn">github.com/andyperlitch/jsbn</a>
</td
</tr>
<tr>
<td><a href="https://npmjs.com/package/jsdom">jsdom</a></td>
<td>22.1.0</td>
<td>MIT</td>
Expand Down Expand Up @@ -5565,7 +5575,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/loupe">loupe</a></td>
<td>3.1.0</td>
<td>2.3.7</td>
<td>MIT</td>
<td>Veselin Todorov</td>
<td>hi@vesln.com</td>
Expand Down Expand Up @@ -6725,7 +6735,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/npm-check-updates">npm-check-updates</a></td>
<td>16.14.14</td>
<td>16.14.15</td>
<td>Apache-2.0</td>
<td>Tomas Junnonen</td>
<td>tomas1@gmail.com</td>
Expand Down Expand Up @@ -7245,7 +7255,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/pathval">pathval</a></td>
<td>2.0.0</td>
<td>1.1.1</td>
<td>MIT</td>
<td>Veselin Todorov</td>
<td>hi@vesln.com</td>
Expand Down Expand Up @@ -7335,16 +7345,6 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/pino">pino</a></td>
<td>8.17.2</td>
<td>MIT</td>
<td>Matteo Collina</td>
<td>hello@matteocollina.com</td>
<td>
<a href="https://github.com/pinojs/pino">github.com/pinojs/pino</a>
</td
</tr>
<tr>
<td><a href="https://npmjs.com/package/pino">pino</a></td>
<td>8.18.0</td>
<td>MIT</td>
<td>Matteo Collina</td>
Expand Down Expand Up @@ -8375,7 +8375,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/socks">socks</a></td>
<td>2.7.1</td>
<td>2.7.3</td>
<td>MIT</td>
<td>Josh Glazebrook</td>
<td></td>
Expand Down Expand Up @@ -8465,7 +8465,7 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</tr>
<tr>
<td><a href="https://npmjs.com/package/spdx-license-ids">spdx-license-ids</a></td>
<td>3.0.16</td>
<td>3.0.17</td>
<td>CC0-1.0</td>
<td>Shinnosuke Watanabe</td>
<td></td>
Expand Down Expand Up @@ -9024,6 +9024,16 @@ <h1>EmailEngine v2.39.9</h1><p>EmailEngine includes code from the following soft
</td
</tr>
<tr>
<td><a href="https://npmjs.com/package/type-detect">type-detect</a></td>
<td>4.0.8</td>
<td>MIT</td>
<td>Jake Luer</td>
<td>jake@alogicalparadox.com</td>
<td>
<a href="https://github.com/chaijs/type-detect">github.com/chaijs/type-detect</a>
</td
</tr>
<tr>
<td><a href="https://npmjs.com/package/type-fest">type-fest</a></td>
<td>0.20.2</td>
<td>(MIT OR CC0-1.0)</td>
Expand Down
26 changes: 13 additions & 13 deletions translations/messages.pot
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=ascii\n"
"POT-Creation-Date: 2024-02-09 12:39+0000\n"
"POT-Creation-Date: 2024-02-12 20:06+0000\n"

#: views/config/license.hbs:48
msgid "%d day"
msgid_plural "%d days"
msgstr[0] ""
msgstr[1] ""

#: views/redirect.hbs:1
msgid "Click <a href=\"%s\">here</a> to continue&mldr;"
msgstr ""

#: views/unsubscribe.hbs:1
#: views/unsubscribe.hbs:79
msgid "Unsubscribe"
Expand Down Expand Up @@ -57,6 +53,10 @@ msgstr ""
msgid "Enter your email address"
msgstr ""

#: views/redirect.hbs:1
msgid "Click <a href=\"%s\">here</a> to continue&mldr;"
msgstr ""

#: views/accounts/register/imap.hbs:11
msgid "Your name"
msgstr ""
Expand All @@ -80,6 +80,14 @@ msgstr ""
msgid "Continue"
msgstr ""

#: views/accounts/register/index.hbs:2
msgid "Choose your email account provider"
msgstr ""

#: views/accounts/register/index.hbs:15
msgid "Standard IMAP"
msgstr ""

#: views/accounts/register/imap-server.hbs:18
msgid "IMAP"
msgstr ""
Expand Down Expand Up @@ -181,14 +189,6 @@ msgstr ""
msgid "HTTP error!"
msgstr ""

#: views/accounts/register/index.hbs:2
msgid "Choose your email account provider"
msgstr ""

#: views/accounts/register/index.hbs:15
msgid "Standard IMAP"
msgstr ""

#: lib/routes-ui.js:602
msgid "Invalid API key for OpenAI"
msgstr ""
Expand Down

0 comments on commit 45df0fd

Please sign in to comment.