Commit graph

31 commits

Author SHA1 Message Date
Steven Nguyen
4ace8ed027
Replace catching \Exception with \Throwable
\Exception doesn't work as a catch-all because not everything extends
\Exception. For example, there was a problem where the messaging worker
didn't catch an exception here:

} catch (\Exception $e) {
    $deliveryErrors[] = 'Failed sending to targets ' . $batchIndex + 1 . '-' . \count($batch) . ' with error: ' . $e->getMessage();
} finally {

As such, $deliveryErrors stayed as an empty array. In this case, the
$adapter->send() threw a TypeError which extends Error which implements
Throwable. Updating the catch to catch \Throwable ensures the error is
caught and $deliveryErrors gets updated.
2024-02-08 01:17:54 +00:00
Torsten Dittmann
9f5a0312cf Merge branch 'main' of https://github.com/appwrite/appwrite into 1.5.x 2024-01-24 11:24:59 +01:00
Matej Bačo
724b8c8098 Merge remote-tracking branch 'origin/1.5.x' into feat-smtp-test 2024-01-22 10:13:28 +00:00
Khushboo Verma
506e8c658d Refactored url construction 2024-01-22 13:48:19 +05:30
Khushboo Verma
d4626b2039 Follow existing style of code 2024-01-19 18:53:17 +05:30
Khushboo Verma
3e5443f127 Add env variables to mails worker instead of webhooks worker 2024-01-19 17:09:48 +05:30
Matej Bačo
20322589dd Improve SMTP test email design 2024-01-17 11:22:08 +00:00
Matej Bačo
ffa4ad09ec Merge remote-tracking branch 'origin/1.5.x' into feat-smtp-test 2024-01-15 11:07:32 +00:00
Matej Bačo
8668f15835 Linter fix 2024-01-15 11:02:05 +00:00
Matej Bačo
d5be48a846 Finish custom SMTP feature 2024-01-15 10:18:17 +00:00
Torsten Dittmann
78f7b1897e
fix: hotfix for redirect param in custom templates (#7437)
* fix: hotfix for redirect param in custom templates
* fix: redirect param variables
* fix: variable typo
* chore: update comments for template variables
2024-01-11 21:36:05 +01:00
Torsten Dittmann
9ba2eafa83
fix: escape html in email params (#7409)
* fix: escape html in email params

* revert: phpunit stop on failure

* chore: fix linter
2024-01-08 18:08:17 +01:00
Matej Bačo
92c4c52a81 QA changes 2024-01-02 13:02:11 +00:00
Damodar Lohani
ffdc662022 fix formatting 2023-12-09 06:41:24 +00:00
Damodar Lohani
e4467521f8
Merge branch 'refactor-usage-sn' into feat-mail-template-override-ur 2023-12-09 07:36:11 +01:00
Damodar Lohani
e3bab623f1 fix redis issue by encoding content 2023-12-08 21:34:39 +00:00
Damodar Lohani
f553576d0e fix linter 2023-12-08 20:06:37 +00:00
Damodar Lohani
386cee5137 mail support string as attachment 2023-12-08 19:57:15 +00:00
Damodar Lohani
5c9199f332
fix empty body template 2023-12-06 16:16:31 +01:00
Damodar Lohani
83d4de9f73
support maile template override 2023-12-06 14:52:13 +01:00
Matej Bačo
9fb6525063 Add new tags from worker, fix queue name 2023-11-22 14:50:57 +01:00
Steven Nguyen
7c1ab91ebc
Add support for variables in email template subject 2023-10-26 16:58:31 -07:00
Steven Nguyen
836ce852ed
Refactor email templates
Update the mails worker to only be responsible for building the final
email using the base (layout) template and the user, team, project, and
redirect variables.

It is the responsibility of the controller to perform localization and
determine whether a custom or default email template should be used.
If the default one is used, it has to be rendered using the hello,
footer, thanks, and signature variables so that it matches the custom
template. Then, it can be sent to the worker.
2023-10-26 16:47:14 -07:00
Torsten Dittmann
d19baafc59 chore: fix linting 2023-10-20 14:43:48 +02:00
Torsten Dittmann
4f77510b0a fix: only apply hook flags to mails worker 2023-10-20 14:42:22 +02:00
Torsten Dittmann
1f97aaf591 fix: disable swoole tcp hook for mails worker 2023-10-20 14:40:59 +02:00
shimon
429dabaaee sync with 1.4 2023-10-03 19:50:48 +03:00
shimon
b02d51c794 migrations worker 2023-10-01 20:39:26 +03:00
shimon
0d2987620c refactor workers 2023-06-04 11:19:49 +03:00
shimon
6e7c160249 changing event signature 2023-06-02 06:54:34 +03:00
shimon
5a22d17459 Mails 2023-05-29 18:03:09 +03:00