Граф коммитов

340 Коммитов

Автор SHA1 Сообщение Дата
Kai Engert f8260cdddd Bug 1114475 - Implement configuration to send a minimal User-Agent header, or no header at all, in sent emails. r=darktrojan
Differential Revision: https://phabricator.services.mozilla.com/D148631

--HG--
extra : amend_source : 11be43f7035f574eba4968b6acc82eda0a90724e
2023-01-13 21:19:33 +11:00
Magnus Melin 8e50caceb1 Bug 1808164 - Port Bug 1806359 - Migrate telemetry modules to ES modules. r=freaktechnik
Differential Revision: https://phabricator.services.mozilla.com/D165786

--HG--
extra : rebase_source : 5cdf22f284649317271578734d6038f89194e5cc
2023-01-04 09:15:49 +11:00
Magnus Melin 2bf0ec9488 Bug 1803405 - Port bug 1793463: Make NS_URIChainHasFlags (mostly) threadsafe. rs=bustage-fix
Differential Revision: https://phabricator.services.mozilla.com/D163578

--HG--
extra : rebase_source : 14bfdd08b948d08d661771763c4a19f8c5ac6b61
2022-12-02 21:55:30 +11:00
Magnus Melin 9a57b5d399 Bug 1802815 - hdr Charset -> charset. r=benc
Differential Revision: https://phabricator.services.mozilla.com/D163293

--HG--
extra : rebase_source : c2e6edc506ccaf1236f834e58b61e3daf4ac5bc1
extra : amend_source : 5fea2005dc5bbd2ba844f93288cfa412e451a441
2022-12-01 21:30:10 +11:00
Magnus Melin fe9d2f7246 Bug 1801529 - mozilla/valid-jsdoc automatic fixups across the Thunderbird codebase. r=aleca
This is the automatic fixes + whitespace fixup:

find . -type f -not -path "./suite/*" -name "*.js" -exec sed -i -E 's/\* @returns +/* @returns /g' {} \;
find . -type f -not -path "./suite/*" -name "*.jsm" -exec sed -i -E 's/\* @returns +/* @returns /g' {} \;

find . -type f -not -path "./suite/*" -name "*.js" -exec sed -i -E 's/\* (@returns \{.+\}) +/* \1 /g' {} \;
find . -type f -not -path "./suite/*" -name "*.jsm" -exec sed -i -E 's/\* (@returns \{.+\}) +/* \1 /g' {} \;

find . -type f -not -path "./suite/*" -name "*.js" -exec sed -i -E 's/\*( @param)( \S+ \S+ ) +/*\1\2- /g' {} \;
find . -type f -not -path "./suite/*" -name "*.jsm" -exec sed -i -E 's/\*( @param)( \S+ \S+ ) +/*\1\2- /g' {} \;

find . -type f -not -path "./suite/*" -name "*.js" -exec sed -i -E 's/\*( @param[^-]*)( - - )/*\1 - /g' {} \;
find . -type f -not -path "./suite/*" -name "*.jsm" -exec sed -i -E 's/\*( @param[^-]*)( - - )/*\1 - /g' {} \;

Differential Revision: https://phabricator.services.mozilla.com/D162704

--HG--
extra : rebase_source : 4307935e658ce38943af522b17ce6b1c0d99dfdd
2022-11-23 15:43:25 +11:00
Martin Giger 5f617743e0 Bug 1801272 - Convert imports of modules from testing/ to ESM. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D162373

--HG--
extra : rebase_source : cf6272b43faaea35793235708edbfc94c407fc9f
2022-11-19 20:04:39 +11:00
Ping Chen bcc94bab90 Bug 136871 - Reuse SMTP connections when sending mails. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D161117

--HG--
extra : amend_source : 55040c92006d502f2c417b95c7a064cb60c3c766
2022-11-04 19:13:37 +11:00
Magnus Melin 7cf828bdfd Bug 1798241 - nsIMsgDatabase naming cleanup. r=benc
Differential Revision: https://phabricator.services.mozilla.com/D161016

--HG--
extra : rebase_source : 046a6b1890657ae53e16bf531c3726daea1b9616
extra : amend_source : 445ffa157df3ce2f9c3cebaf60902252b94e6ed1
2022-11-03 21:16:52 +11:00
Ping Chen 550a7a9885 Bug 1794997 - Get account from identity to prevent sending with the wrong account. r=mkmelin
Authenticate if needed before sending POST command.

Differential Revision: https://phabricator.services.mozilla.com/D159459

--HG--
extra : rebase_source : cfaff1720ac01be6d4254ca08969a84828437e01
extra : amend_source : 33127740f63cd6b7a36c4a64839c016051075e6d
extra : absorb_source : e7e4b14483b704b480c90d6955b19139faa8f75c
2022-10-25 21:20:58 +11:00
Martin Giger ea05927888 Bug 1792869 - Convert XPCOMUtils imports to esm in mailnews/. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D159063

--HG--
extra : rebase_source : 332a690910fc8c17ac702d3af4e3693faede08e0
extra : amend_source : cd0bb3cabc7d2322bec1024b82f5fd89b5fe6899
2022-10-12 21:41:55 +11:00
Geoff Lankow a15a0ee158 Bug 1791459 - Convert more test setup functions to add_setup. rs=me
--HG--
extra : rebase_source : 4f7b0df4d57b69d1883330dab60b07f726505b89
2022-10-03 11:12:44 +13:00
Rob Lemley c098c97425 Bug 1792817 - Port bug 1792365: Migrate some toolkit module imports to ESM. r=mkmelin
../mach tb-esmify --upstream-imports calendar --prefix=toolkit/
../mach tb-esmify --upstream-imports chat --prefix=toolkit/
../mach tb-esmify --upstream-imports mail --prefix=toolkit/
../mach tb-esmify --upstream-imports mailnews --prefix=toolkit/

Differential Revision: https://phabricator.services.mozilla.com/D158363

--HG--
extra : amend_source : e4e2791bd957bf16ed1907589c3c18ad5f0ec618
2022-09-30 20:44:14 +10:00
Ping Chen 2f8bd68359 Bug 1786655 - Use PascalCase for class names in {Smtpd,Nntpd,Pop3d}.jsm. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D155443

--HG--
extra : rebase_source : 8c643aaf5259ce46ce813022af97717bfe5d828b
extra : amend_source : 9cb9163749ccd3846169ffbfd066fac64de507a9
2022-08-24 20:26:12 +10:00
Magnus Melin 256f36299a Bug 1773123 - follow-up - adjust tests. rs=bustage-fix DONTBUILD
Direct compares do not necessarily work, since the actual objects are not the same.

--HG--
extra : amend_source : 4beccc4276882c3d9ebcf1eeb0d9c3eb0e6650ec
2022-08-09 22:01:12 +10:00
Geoff Lankow 324b1504f3 Bug 1782647 - Add a unique identifier to nsISmtpServer. r=mkmelin
Adds a 'UID' attribute, stored in the server's preferences as 'uid', just like nsIAbDirectory. If there's no value, a new UUID is created on access.

Differential Revision: https://phabricator.services.mozilla.com/D153824

--HG--
extra : rebase_source : 437b905977a0651ecf1ef4d104ab394804097abc
2022-08-02 15:34:56 +12:00
Magnus Melin 8928aa83cd Bug 1776851 - Q encoding should use uppercase characters according to RFC 2047. r=rnons
Differential Revision: https://phabricator.services.mozilla.com/D153556

--HG--
extra : rebase_source : 82d4f4edb48d5cba9227b5127f4fe4ea0c561cab
extra : amend_source : 90f2cfaba486cd0ef132b825d7c67f808554dd9c
2022-08-04 14:54:01 +10:00
Magnus Melin 658036deef Bug 1779145 - Port bug 1667455 to Thunderbird - Expose a "Services" property on all privileged JS scopes (like Cu/Cc/Ci). r=leftmostcat
Changed prettier printWidth to 100 to put Services.jsm on one line, prettified and then
   grep -rEl "/Services.jsm" --exclude-dir=.hg --exclude-dir=suite --include="*.js" --include="*.jsm" --exclude=".*" . | xargs xargs sed -i -e '/\/Services.jsm/d'

Differential Revision: https://phabricator.services.mozilla.com/D151575

--HG--
extra : rebase_source : 43da2706d3b30f5062511cedd527e9fb65631f02
extra : amend_source : 863bfd4ad3930f4fe4ed0b3dba6061370118f9a5
2022-07-18 20:26:40 +10:00
Ping Chen 69beebc3f2 Bug 1774525 - Deduplicate recipients before calling RCPT TO in SmtpClient. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D149500

--HG--
extra : rebase_source : 02f54bd8d7ae98a8798ff9be09c4e8c69d2c7289
2022-06-16 13:00:15 +03:00
Ping Chen 6c5b53d343 Bug 1773672 - Show error when recipient has non-ascii local part but server has no SMTPUTF8 capability. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D149198

--HG--
extra : rebase_source : 7e9959453ff6694b2ed5ecc3e525f0f3cfb27d7c
2022-06-16 12:59:05 +03:00
Magnus Melin e63f1f3a96 Backed out changeset 1e2ea64ba63e (Bug 1773672) for test failures. rs=backout 2022-06-15 20:23:59 +03:00
Ping Chen 85713d148a Bug 1773672 - Show error when recipient has non-ascii local part but server has no SMTPUTF8 capability. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D149198

--HG--
extra : absorb_source : c23977e3dc06d0c5995990661241f7b3cdff5e75
2022-06-14 06:37:03 +00:00
John Bieling 7b71038359 Bug 1747456 - Allow compose.sendMessage() to await the entire send process and add compose.saveMessage(). r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D146689

--HG--
extra : amend_source : 11c165833c4eb75188e549caf5c32d3559dcca43
2022-05-28 13:03:07 +03:00
Rachel Martin eb2ad913ef Bug 1766974 - Fix typos in mail and mailnews found with codespell. r=Paenglab,john.bieling,kaie
--HG--
extra : amend_source : 256a23051dda81f4e807183e44947a731d36b756
2022-04-30 13:30:36 +03:00
Henry Wilkes fe51e5cea4 Bug 1727493 - Replace mail.default_html_action and mailnews.sendformat.auto_downgrade with mail.default_send_format. r=mkmelin,BenB
Prior to this patch, mail.default_html_action ("default_html_action") and mailnews.sendformat.auto_downgrade ("auto_downgrade") were used as parameters in nsMsgCompose::DetermineHTMLAction to decide on whether to send HTML, PlainText, both parts, or to ask the user.

DetermineHTMLAction is removed in this patch, and we replace the its behaviour with a single mail.default_send_format preference, with 4 values:

+ PlainText - Always send plain text. Equivalent to "default_html_action" set to PlainText before (regardless of "auto_downgrade").
+ HTML - Always send HTML. Equivalent to "default_html_action" set to HTML and "auto_downgrade" set to false.
+ Both - Always send both HTML and plain text. Equivalent to "default_html_action" set to Both and "auto_downgrade" set to false.
+ Auto - Send only plain text if the message lacks formatting, else send both. Equivalent to "default_html_action" set to Both and "auto_downgrade" set to true. This was the default before and after this patch.

The lost behaviour is:

+ "default_html_action" set to "AskUser". This would ask the user what format to send using the askSendFormat dialog. This is now dropped, along with the dialog, and transferred to the Auto default.
+ "default_html_action" set to "HTML" and "auto_downgrade" set to true. This is transferred to the Auto default.

The new "default_send_format" preferences is now linked directly to MsgCompFields.deliveryFormat. New messages have their MsgCompFields.deliveryFormat set to nsIMsgCompSendFormat.Unset, but this is changed to the value of "default_send_format" when it is loaded into the compose window. As before, the deliveryFormat can be set to a different value using the #outputFormatMenu (the compose window's "Options, Delivery Format" menu). This also means that the 4 values for "default_send_format" correspond to the 4 menuitems. Just as before, the deliveryFormat is saved for drafts or templates. Note that the "Unset" value is only used as an initial value for the deliveryFormat field, and it is never used again after it has been opened for the first time.

Note, prior to this patch, nsIMsgCompSendFormat.AskUser was used as a value for MsgCompFields.deliveryFormat to indicate that the send format should use DetermineHTMLAction, rather than an explicit value (the name was a misnomer in this case). The "AskUser" enum has been renamed to "Unset". This means that any drafts or templates saved by a user before this patch without an explicitly set format will now be opened with the default send format, the same as newly created messages. This acts as a convenient bridge between the old and new behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D136009

--HG--
extra : amend_source : 8fd622c39171d4992a07dc2404d0a75215a74fe8
2022-04-28 12:55:41 +03:00
Henry Wilkes 2810602b6d Bug 1727493 - Remove plaintext_domains and html_domains preferences. r=mkmelin,BenB
Differential Revision: https://phabricator.services.mozilla.com/D136008

--HG--
extra : amend_source : 0694be272757a3c1b3d5d39c6ea831885e3e61be
2022-04-28 12:55:15 +03:00
Ping Chen 280a843114 Bug 1759197 - Support clientid extension in SmtpClient.jsm. r=mkmelin
Based on patch from developers@wizard.ca.

Differential Revision: https://phabricator.services.mozilla.com/D141317

--HG--
extra : amend_source : 0ac78b488d4dd15076848d9fba44713afcb6de91
2022-03-17 12:00:11 +02:00
Geoff Lankow 2b59b58f3c Bug 1758460 - Get rid the PreferMailFormat address book card property. r=mkmelin,BenB
Differential Revision: https://phabricator.services.mozilla.com/D140512

--HG--
extra : rebase_source : 187f6afd1557263d8d840a1ed086d099d9cf5de2
extra : amend_source : b158c3e436a8e70e4316a5685cb0492e3affa8e9
2022-03-07 22:51:11 +13:00
John Bieling 3ac3123e39 Bug 1670791 - Fix unit tests. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D140451

--HG--
extra : amend_source : 0971175de31800ca2e5496cb90bfcbac1c84135e
2022-03-07 12:23:01 +02:00
Nicolai Kasper 5daf7a9cd8 Bug 1571683 - Part 5: Replace asyncTestUtils.js functionality with promises in mailnews/compose/test/unit/test_sendMessageLater2.js. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D139374

Depends on D139373

--HG--
extra : histedit_source : 41146ff9fa41cdf1d57f94a20924c63914fa750d
2022-02-22 15:20:46 +00:00
Mark Banner 794de8abbd Bug 1743232 - Allow nsIMsgSend.createAndSendMessage to handle non-ascii bodies when called from JavaScript. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D132292

--HG--
extra : amend_source : 4277784552550c5a5a773cb20183b806ffc3fc8c
2021-12-03 12:47:04 +02:00
Kai Engert d365482bd3 Bug 1731529 - Restore TB78 behavior for MIME multipart newlines. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D126783
2021-11-23 21:54:28 +00:00
Ben Campbell f4ac979871 Bug 1736258 - Fix crashes in test_attachment_intl.js, test_nsMsgCompose2.js (regressed due to Bug 1735601). r=darktrojan
Differential Revision: https://phabricator.services.mozilla.com/D128696

--HG--
extra : amend_source : a8e3710e4f6ac96866f410b913e3244acca5fa9c
2021-10-18 12:55:12 +03:00
Ping Chen b1cac7da88 Bug 1733366 - Add test_smtpClient.js. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D127920

--HG--
extra : amend_source : 30fecf64126014c4132169f3fc27df51797e403f
2021-10-09 13:54:28 +03:00
Ping Chen c80144e2dc Bug 1734210 - Fix sending default custom header value with colons. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D127606

--HG--
extra : histedit_source : 99803a0e1056a63a7166b80c970e9ec3101ff2e5
2021-10-06 02:05:20 +00:00
Ping Chen 6fda60c409 Bug 1734070 followup - Fix two tests. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D127604

--HG--
extra : amend_source : c109bbabe76e678a9da413c98c005eff471718f0
2021-10-06 13:17:41 +03:00
Ping Chen 5c3d50531a Bug 1734070 - Fix sending bcc only mail from Outbox. r=mkmelin
With a bcc only message, nsMsgSendLater passes `To: undisclosed-recipients: ;` to SmtpService, but it should not be sent to the SMTP server.

Differential Revision: https://phabricator.services.mozilla.com/D127515

--HG--
extra : amend_source : 05a1d048fc7f1e847c78e6cd765f6c814bd656fb
2021-10-05 13:33:13 +03:00
Ping Chen ccca32d20d Bug 1730738 - Fix bcc header in fcc when sending from Outbox. r=mkmelin
MessageSend.jsm removes bcc header before delivering, no need to do it in nsMsgSendLater.

Differential Revision: https://phabricator.services.mozilla.com/D125639

--HG--
extra : amend_source : 47f9ea4951d7ebecab013e03c50b8c3c6f65f88f
extra : histedit_source : 013c3a9ac9347570538890b56761f0734eda3812
2021-09-16 12:55:04 +03:00
Ping Chen 53ad5ed3e0 Bug 1729437 - Use the full body to pick encoding in MimeEncoder.jsm. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D125136

--HG--
extra : amend_source : 4b7ec944ff02914c96ad53d68a00bb8e059ede16
2021-09-10 13:01:57 +03:00
Ping Chen e8780ecc2c Bug 1724176 - Make SmtpService.jsm the only implementation of nsISmtpService. r=mkmelin
- Remove nsSmtpService from nsMailModule.cpp
- Remove SmtpModuleLoader.jsm

Depends on D122803.

Differential Revision: https://phabricator.services.mozilla.com/D122804

--HG--
extra : amend_source : 71ed26a96b1fc3da201f73ab01530b24d340e374
2021-08-18 12:54:13 +03:00
Ping Chen b42a7cc152 Bug 1726018 - Fix getter/setter of description/hostname in SmtpServer.jsm. r=mkmelin
Use getStringPref/setStringPref to handle AUTF8String.

Differential Revision: https://phabricator.services.mozilla.com/D122800

--HG--
extra : amend_source : 5f17e05c8a72325e8e522615dabd18202014c42c
2021-08-17 13:28:31 +03:00
Ping Chen 6820aaa407 Bug 1724177 - Make MessageSend.jsm the only implementation of nsIMsgSend. r=mkmelin
- Remove nsMsgSend from nsMailModule.cpp
- Remove MsgSendModuleLoader.jsm

Differential Revision: https://phabricator.services.mozilla.com/D122564

--HG--
extra : rebase_source : d1dbb5a5bdf48ffb54fa3108155b7e7515997a02
extra : amend_source : c07b5faaee9cafc4d6618d4a0295daf5d445a806
2021-08-13 12:53:21 +03:00
Ben Campbell 660ed07b28 Bug 1715433 - Use initial-lowercase-letter naming convention in nsIMsgCopyService. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D117256

--HG--
extra : amend_source : 9466d9ce3ff06bc5a7ca014c514d70e023b421b4
2021-06-09 12:57:51 +03:00
Ping Chen 758558e12c Bug 1711963 - Support setting default server in SmtpService.jsm. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D115770

--HG--
extra : amend_source : db4bfb33371751df39ea8b0aedce1495fcefc9af
2021-05-24 13:49:46 +03:00
Magnus Melin a68ddcf6fc Bug 1710581 - followup lint fix. rs=eslint DONTBUILD
--HG--
extra : amend_source : fa076d267bd5f5494a20245aa291d3a4ea7d1544
2021-05-12 13:48:44 +03:00
tom@pep-project.org 776509f69c Bug 1710581 - enhance test_createRFC822Message.js with some binary data. r=rnons 2021-05-12 13:29:08 +03:00
Ping Chen 586a9d0f46 Bug 1710043 - Fix converting html to plain text in MimeMessage.jsm. r=mkmelin
nsIParserUtils.convertToPlainText expects a unicode string, but we passed a binary string.

Differential Revision: https://phabricator.services.mozilla.com/D114708

--HG--
extra : amend_source : ae19e321faddda1a116b1ab76bda165f8c5cc050
2021-05-11 13:26:36 +03:00
Ping Chen 3876c5a34b Bug 1707178 - Fix sending bcc mail with non-UTF8 eml attachments. r=mkmelin
The original encoding of non-UTF8 eml attachments are kept in the final message file, so the final message file is not guaranteed to be UTF-8. This patch changes to use read/write instead of readUTF8/writeUTF8.

Differential Revision: https://phabricator.services.mozilla.com/D113619

--HG--
extra : amend_source : 82548958da7bafae33be67bf73b00cddf842bb2a
2021-04-29 12:47:00 +03:00
Ping Chen 794d182373 Bug 1704713 - Fix intermittent test_temporaryFilesRemoved.js by removing IOUtils.stat call. r=mkmelin
Checking path name is good enough.
IOUtils.stat is not needed and made the test intermittent on Windows.
2021-04-22 12:56:54 +03:00
Ping Chen 7554b6802c Bug 1702197 - Prevent using quoted-printable for format=flowed message. r=mkmelin
Also fix removing stuffed space in format=flowed message.

Differential Revision: https://phabricator.services.mozilla.com/D112679

--HG--
extra : amend_source : b26cbdcfc3ca9bb8232a49972d6f7191b043597a
2021-04-22 12:54:53 +03:00
Ping Chen f49e4ae32d Bug 1704409 - Call OnStartRunningUrl and pass specific nsresult to OnStopRunningUrl in SmtpService.jsm. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D111588

--HG--
extra : moz-landing-system : lando
2021-04-13 04:38:39 +00:00