mirror of
https://github.com/docusealco/docuseal
synced 2026-11-08 23:42:32 -05:00
adjust email templates
This commit is contained in:
1 parent
43b32d05cb
commit
d53fa5613b
35 files changed
+160
-57
No files matched your search
@@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ApplicationMailer < ActionMailer::Base
|
||||
default from: 'from@example.com'
|
||||
default from: 'DocuSeal <hi@docuseal.co>'
|
||||
layout 'mailer'
|
||||
|
||||
register_interceptor ActionMailerConfigsInterceptor
|
||||
|
||||
@@ -1,19 +1,32 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class SubmitterMailer < ApplicationMailer
|
||||
DEFAULT_MESSAGE = "You've been invited to submit the following documents:"
|
||||
DEFAULT_MESSAGE = %(You have been invited to submit the "%<name>s" form:)
|
||||
|
||||
def invitation_email(submitter, message: DEFAULT_MESSAGE)
|
||||
def invitation_email(submitter, message: format(DEFAULT_MESSAGE, name: submitter.submission.template.name))
|
||||
@submitter = submitter
|
||||
@message = message
|
||||
|
||||
mail(to: @submitter.email,
|
||||
subject: 'You have been invited to submit forms')
|
||||
subject: 'You have been invited to submit a form')
|
||||
end
|
||||
|
||||
def copy_to_submitter(submitter)
|
||||
def completed_email(submitter, user)
|
||||
@submitter = submitter
|
||||
@user = user
|
||||
|
||||
mail(to: submitter.email, subject: 'Here is your copy')
|
||||
mail(to: user.email,
|
||||
subject: %(#{submitter.email} has completed the "#{submitter.submission.template.name}" form))
|
||||
end
|
||||
|
||||
def documents_copy_email(submitter)
|
||||
@submitter = submitter
|
||||
@documents = Submitters.select_attachments_for_download(submitter)
|
||||
|
||||
@documents.each do |attachment|
|
||||
attachments[attachment.filename.to_s] = attachment.download
|
||||
end
|
||||
|
||||
mail(to: submitter.email, subject: 'Your copy of documents')
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user