mirror of
1
Fork 0
forgejo/services/mailer
forgejo-backport-action 50b7009603 [v7.0/forgejo] Add inline attachments to comments and prevent double handling of mails (#3566)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/3504

If incoming email is configured and an email is sent, inline attachments are currently not added to the comment if it has the `Content-Disposition: inline` instead of `Content-Disposition: attachment` as e.g. with Apple Mail.

This adds inline attachments (`Content-Disposition: inline`) that *have a filename* as attachment to the comment. Other elements with `Content-Disposition: inline` are not attached as attachment to the comment.

In addition, a check has been added to prevent mails from being processed twice.

Fixes #3496

Co-authored-by: Beowulf <beowulf@beocode.eu>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3566
Reviewed-by: Beowulf <beowulf@beocode.eu>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2024-05-01 12:19:38 +00:00
..
incoming [v7.0/forgejo] Add inline attachments to comments and prevent double handling of mails (#3566) 2024-05-01 12:19:38 +00:00
token [GITEA] Drop sha256-simd in favor of stdlib 2024-02-05 16:09:40 +01:00
mail.go services: Use proper Message-IDs for release mails 2024-04-19 08:42:18 +00:00
mail_admin_new_user.go Rename Str2html to SanitizeHTML and clarify its behavior (followup) 2024-03-06 12:10:45 +08:00
mail_admin_new_user_test.go [GITEA] notifies admins on new user registration 2024-02-05 16:09:28 +01:00
mail_comment.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
mail_issue.go Clean up template locale usage (#27856) 2023-10-31 22:11:48 +08:00
mail_release.go services: Use proper Message-IDs for release mails 2024-04-19 08:42:18 +00:00
mail_repo.go Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
mail_team_invite.go Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
mail_test.go Use relative links for commits, mentions, and issues in markdown (#29427) 2024-03-20 08:46:28 +01:00
mailer.go Clean up template locale usage (#27856) 2023-10-31 22:11:48 +08:00
mailer_test.go services: Use proper Message-IDs for release mails 2024-04-19 08:42:18 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
notify.go [GITEA] notifies admins on new user registration 2024-02-05 16:09:28 +01:00