Daniel Kesselberg
336c6d2957
feat(ocp): add email address validator
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2025-08-14 18:34:36 +07:00
Robin Appelman
aa15f9d16d
chore: run rector
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-07-01 22:45:52 +07:00
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
# Conflicts:
# apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
Robin Appelman
29e39c0a2e
chore: run rector on tests
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-06-12 18:31:58 +07:00
Joas Schilling
c5cd7ef9b9
test: Fix tests/lib/[H-N]*
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-15 08:24:59 +07:00
Ferdinand Thiessen
8f8c11ad4e
fix(mail): use matching text color for primary elements
...
when we use the default primary as background color we have to use the
default primary text color as well.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-17 11:51:46 +07:00
Thomas Lehmann
e4c013d86d
feat(Mailer): add "null" SMTP transport mode
...
== Goal
Allow disabling mail delivery altogether.
== Usecase
If mails ought to be send by other means than rendering messages from
templates and sending them via SMTP-like protocols.
Example: listening to specific Nextcloud events and pass parameters to
a centralized (i.e. REST-based) API that sends e-mails.
Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
2024-11-19 11:32:39 +07:00
Thomas Lehmann
46d8a7333b
feat(Mailer): implement caching
...
Currently $this->instance is never set, so the code is no-op. This
brings back caching of the instance.
Caching broke with
be7db1573d
Swift to \Swift_Mailer as abstraction
Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
2024-11-19 11:32:39 +07:00
Joas Schilling
e6cd1051da
fix(message): Fix logic of Mail test
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-10-07 12:11:38 +07:00
Josh
87aa1267a8
fix(Mailer): Fix sendmail binary fallback
...
feat: add debug logging to sendmail binary finder
Signed-off-by: Josh <josh.t.richards@gmail.com>
2024-09-16 15:20:29 +07:00
Christoph Wurst
49dd79eabb
refactor: Add void return type to PHPUnit test methods
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 22:32:31 +07:00
Daniel Kesselberg
af6de04e9e
style: update codestyle for coding-standard 1.2.3
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
SebastianKrupinski
fc0b694d37
feat: mail provider backend
...
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
2024-07-23 16:20:36 +07:00
Joas Schilling
693a81bfa3
fix(mail): Fix big logos in mail templates for Outlook
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-07-17 09:24:55 +07:00
Ferdinand Thiessen
1a27314530
fix(Mailer): Allow to enforce strict email format
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-05-31 14:18:06 +07:00
Andy Scherzinger
1f7e2ba599
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-13 17:41:36 +07:00
FedericoHeichou
609e751667
Add "-i" to MailTest's pipe
...
Signed-off-by: FedericoHeichou <federicoheichou@gmail.com>
2024-01-19 17:08:01 +07:00
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Simon L
1cb81ae625
try to fix tests
...
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-06-23 17:12:45 +07:00
Côme Chilliet
8d5165e8dc
Adapt tests to config value typing
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 17:42:14 +07:00
Côme Chilliet
dde5c46a3e
Migrate to Symfony Mailer
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-02 10:30:06 +07:00
Joas Schilling
959e2aaa17
fix(tests): Fix method name in unit tests
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-01-30 09:12:50 +07:00
Bennet Becker
4dc0957164
refactor AutoSubmittedValue to Headers\AutoSubmitted and adding
...
header name to constants
Signed-off-by: Bennet Becker <dev@bennet.cc>
2023-01-03 15:15:35 +07:00
Bennet Becker
411467af57
fix static-analysis error and formatting code
...
Signed-off-by: Bennet Becker <dev@bennet.cc>
2022-12-23 21:48:52 +07:00
Bennet Becker
c1c6d215c7
fix getAutoSubmitted return type and adding unit tests
...
Signed-off-by: Bennet Becker <bbecker@pks.mpg.de>
2022-12-23 19:26:49 +07:00
Julius Härtl
fd036f774f
Do not throw errors when invalid setTo email is provided
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-11-03 16:59:12 +07:00
Côme Chilliet
6f80fe6ada
Remove deprecated at matcher from tests/lib
...
Only 15 warnings left in there
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-29 16:36:40 +07:00
Carl Schwan
9b8ca9ad1f
Move findBinaryFinder and isFunctionEnabled away from OC_Helper
...
findBinaryFinder is now a service that is still private but with some
minor optimization (remove the hasKey check).
isFunctionEnabled is now in OCP\Util
Both function are still keep but all internal usage in nextcloud/server
were migrated to the new usage, so that we can remove it in 26
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-23 19:44:04 +07:00
Côme Chilliet
61f7f13bd8
Migrate from ILogger to LoggerInterface where needed in the tests
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:26 +07:00
Carl Schwan
6312c0df69
Check style update
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 00:19:07 +07:00
Daniel Kesselberg
747325fc43
Set local domain for swiftmailer transport
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-05-31 15:04:00 +07:00
Christoph Wurst
883848b58a
Micro-optimize validation of empty email addresses
...
Then we don't have to construct any validators.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-02-11 15:15:38 +07:00
Morris Jobke
234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-12 13:55:19 +07:00
Roeland Jago Douma
bb4dedb015
Provide the proper language to the mailer
...
Else we can't properly translate the footer in the recipients e-mail
language.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-04-16 09:04:13 +07:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
...
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +07:00
Christoph Wurst
41b5e5923a
Use exactly one empty line after the namespace declaration
...
For PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +07:00
Christoph Wurst
463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
...
Remove unused imports
2020-03-27 17:14:08 +07:00
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +07:00
Christoph Wurst
25ab122245
Merge pull request #20172 from nextcloud/techdebt/phpunit-short-return
...
Use the shorter phpunit syntax for mocked return values
2020-03-26 09:25:19 +07:00
Christoph Wurst
2ee65f177e
Use the shorter phpunit syntax for mocked return values
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:21:27 +07:00
Christoph Wurst
74936c49ea
Remove unused imports
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +07:00
Christoph Wurst
23eb0462e5
Use lowercase true, false and null constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 21:53:04 +07:00
Arne Hamann
a16aa99586
Added Hook before Message is send
...
Signed-off-by: Arne Hamann <kontakt+github@arne.email>
2020-03-24 20:57:27 +07:00
Roeland Jago Douma
3a7cf40aaa
Mode to modern phpunit
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:18 +07:00
Roeland Jago Douma
c007ca624f
Make phpunit8 compatible
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +07:00
Branko Kokanovic
7cef9b0248
Addressing comments, array() to []
...
Signed-off-by: Branko Kokanovic <branko@kokanovic.org>
2018-12-17 23:34:55 +07:00
Branko Kokanovic
72d97b44a7
Expose Swift Mailer streaming options in config, fixes #12702
...
Signed-off-by: Branko Kokanovic <branko@kokanovic.org>
2018-11-30 22:36:03 +07:00
Daniel Kesselberg
4a2c56b714
Add testcases for pipe mode
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-11-29 16:02:37 +07:00
Roeland Jago Douma
054056a8df
Fallback to default path is sendmail can't be found
...
If the sendmail binary can't be found at all we fallback to the default
path.
It most likely is not there but then at least a proper error message
pops up.
Updated the tests to also properly pass.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-11-02 14:03:11 +07:00
Roeland Jago Douma
be7db1573d
Swift to \Swift_Mailer as abstraction
...
* \Swift_Mailer handles starting the transport etc properly
* Fixed tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-07-04 08:28:33 +07:00