add ability to edit html email

This commit is contained in:
Alex Turchyn authored and Pete Matsyburka committed 2026-07-10 21:57:23 +03:00
1 parent bdf5e58929
commit bba5626dea
14 files changed
+814 -88

No files matched your search

+5
View File
@@ -8,9 +8,14 @@ module EmailMessages
ASSET_REGEXP = Regexp.union(STYLE_REGEXP, BASE64_REGEXP)
ASSET_PREFIX = '[[asset:'
PLACEHOLDER_REGEXP = /\[\[asset:(\h{40})\]\]/
HTML_MIME_TYPES = ['text/html', 'application/xhtml+xml'].freeze
module_function
def html_body?(content)
content.present? && HTML_MIME_TYPES.include?(Marcel::MimeType.for(content.dup))
end
def find_or_create_for_account_user(account, user, subject, body)
subject = I18n.t(:you_are_invited_to_sign_a_document) if subject.blank?