aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Mail/Mailer.php
Commit message (Collapse)AuthorAgeFilesLines
* feat(Mailer): add "null" SMTP transport modeThomas Lehmann2024-11-191-0/+4
| | | | | | | | | | | | | | | | == 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>
* chore(Mailer): remove no-op local variable initilizationThomas Lehmann2024-11-191-2/+0
| | | | | | The IDE hinted the value is immediately overwritten. Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
* feat(Mailer): implement cachingThomas Lehmann2024-11-191-1/+3
| | | | | | | | | | | | | Currently $this->instance is never set, so the code is no-op. This brings back caching of the instance. Caching broke with be7db1573dc8c6e7309ec9db124a7a74b8b41199 Swift to \Swift_Mailer as abstraction Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
* chore(deps): Bump nextcloud/coding-standard in /vendor-bin/cs-fixerdependabot/composer/vendor-bin/cs-fixer/nextcloud/coding-standard-1.3.2dependabot[bot]2024-10-191-6/+6
| | | | | | | | | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v1.3.1...v1.3.2) --- updated-dependencies: - dependency-name: nextcloud/coding-standard dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(Mailer): Fix sendmail binary fallbackfix/mailer-binaryfinder-fallbackJosh2024-09-161-1/+4
| | | | | | feat: add debug logging to sendmail binary finder Signed-off-by: Josh <josh.t.richards@gmail.com>
* Merge pull request #47435 from phreaker0/fix-mail-template-class-callJoas Schilling2024-08-261-12/+14
|\ | | | | fix(mailer): Call to custom mail_template_class
| * fix call to custom mail_template_classChristoph Klaffl2024-08-221-12/+14
| | | | | | | | Signed-off-by: Christoph Klaffl <christoph@phreaker.eu>
* | style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-4/+4
|/ | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix(mail): Fix big logos in mail templates for OutlookJoas Schilling2024-07-171-0/+33
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(Mailer): Allow to enforce strict email formatFerdinand Thiessen2024-05-311-1/+4
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Merge branch 'master' into refactor/OC-Server-getMailerJohn Molakvoæ2024-05-301-31/+4
|\ | | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| * chore: Add SPDX headerAndy Scherzinger2024-05-241-30/+3
| | | | | | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
| * Add "-i" to sendmail's pipe FedericoHeichou2024-01-191-1/+1
| | | | | | Signed-off-by: FedericoHeichou <federicoheichou@gmail.com>
* | Refactor `OC\Server::getMailer`Andrew Summers2023-08-291-1/+1
|/ | | | Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
* Merge pull request #38958 from nextcloud/enh/noid/use-getsystemvalue-mailerSimon L2023-06-261-4/+4
|\ | | | | use getsystemvalue-functions in Mailer.php
| * use getsystemvalue-functions in Mailer.phpSimon L2023-06-231-4/+4
| | | | | | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* | Refactors lib/private/Mail.Faraz Samapoor2023-06-251-38/+14
|/ | | | | | Mainly using PHP8's constructor property promotion. Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* Use typed version of IConfig::getSystemValue as much as possibleCôme Chilliet2023-04-051-11/+10
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Migrate to Symfony MailerCôme Chilliet2023-02-021-67/+105
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Move findBinaryFinder and isFunctionEnabled away from OC_HelperCarl Schwan2022-08-231-11/+7
| | | | | | | | | | | | 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>
* Extend email loggingJoas Schilling2022-06-281-0/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Migrate from ILogger to LoggerInterface in lib/privateCôme Chilliet2022-03-241-12/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Check style updateCarl Schwan2022-01-131-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge pull request #27306 from ↵Christoph Wurst2021-06-081-1/+10
|\ | | | | | | | | nextcloud/enh/noid/set-local-domain-for-swiftmailer Set local domain for swiftmailer
| * Set local domain for swiftmailer transportDaniel Kesselberg2021-05-311-1/+10
| | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
|/ | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-1/+1
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Micro-optimize validation of empty email addressesChristoph Wurst2021-02-111-0/+4
| | | | | | Then we don't have to construct any validators. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix example usagekevin1471472020-08-231-3/+3
|
* Update license headers for 19Christoph Wurst2020-04-291-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Adhere to EMailTemplate interface in constructor call.Tekhnee2020-04-251-1/+1
| | | | | Email creation appears to have been refactored lately but it looks like custom template-based emails were left out. Signed-off-by: Tekhnee <info@tekhnee.org>
* Provide the proper language to the mailerRoeland Jago Douma2020-04-161-2/+7
| | | | | | | Else we can't properly translate the footer in the recipients e-mail language. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-2/+2
| | | | | | | | | | | | | | | 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>
* Make sure there is exactly one newline after importsChristoph Wurst2020-04-091-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Added Hook before Message is sendArne Hamann2020-03-241-1/+13
| | | | Signed-off-by: Arne Hamann <kontakt+github@arne.email>
* Do not use the instance name as user part of from mail addressesJulius Härtl2020-03-121-1/+1
| | | | | | | This will cause issues since the theming name can contain characters that are not allowed in the local part of the mail address (like spaces) Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update license headersChristoph Wurst2019-12-051-1/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+1
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Addressing comments, array() to []Branko Kokanovic2018-12-171-1/+1
| | | | Signed-off-by: Branko Kokanovic <branko@kokanovic.org>
* Addressing comments, count to emptyBranko Kokanovic2018-12-171-1/+1
| | | | Signed-off-by: Branko Kokanovic <branko@kokanovic.org>
* Expose Swift Mailer streaming options in config, fixes #12702Branko Kokanovic2018-11-301-0/+4
| | | | Signed-off-by: Branko Kokanovic <branko@kokanovic.org>
* Apply patch from @cwiedmann but drop -oi option for pipeCarsten Wiedmann2018-11-291-1/+10
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Fallback to default path is sendmail can't be foundRoeland Jago Douma2018-11-021-1/+5
| | | | | | | | | | | 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>
* Mailer: discover sendmail path instead of hardcoding it to /usr/sbin/sendmailFlorian Klink2018-11-021-1/+1
| | | | | | | | | | | | | `sendmail` can very well be in a path different from `/usr/sbin/sendmail`. We already search `$PATH` at `lib/private/Settings/Admin/Mail.php` to detect whether we want to offer sendmail as a mail transfer method, so let's be consistent and actually initialize `\Swift_SendmailTransport` with this path to sendmail, instead of just hardcoding `/usr/sbin/sendmail`. Signed-off-by: Florian Klink <flokli@flokli.de>
* Swift to \Swift_Mailer as abstractionRoeland Jago Douma2018-07-041-12/+9
| | | | | | | * \Swift_Mailer handles starting the transport etc properly * Fixed tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make swift 6 compatibleRoeland Jago Douma2018-07-041-26/+16
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Provide an option to disable HTML emailsMorris Jobke2018-04-161-1/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Do not convert email addresses with idn_to_ascii if INTL_IDNA_VARIANT_UTS46 ↵Jared Boone2018-04-051-1/+1
| | | | | | | | is undefined. Fixes https://github.com/nextcloud/server/issues/8387. Signed-off-by: Jared Boone <jared.boone@gmail.com>