Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into new-check-page
- Loading branch information
Showing
9 changed files
with
39 additions
and
13 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
class PortalMailer < ApplicationMailer | ||
|
||
include ApplicationHelper | ||
|
||
# @param recipients [Array<String>] - email addresses of recipients - can be a string of comma separated email adresses too | ||
# @param reply_to [Array<String>] - email addresses of recipient of the answer - can be a string of comma separated email adresses too | ||
# @param subject [String] - subject of the mail | ||
# @param content [String] - content of the mail | ||
# @param some_attachments - array of hashes with name and content | ||
# @return [ActionMailer::MessageDelivery] a mail object with the given parameters. | ||
def generic_email(recipients, reply_to, subject, content, some_attachments = []) | ||
some_attachments.each do |attachment| | ||
def generic_email(recipients, reply_to, subject, content, attached_files = []) | ||
attached_files.each do | attachment | | ||
attachments[attachment[:name]] = attachment[:content] | ||
end | ||
mail(to: recipients, reply_to: reply_to, subject: subject, body: content) | ||
mail(to: recipients, reply_to: reply_to, subject: subject) do | format | | ||
format.html { markdown content } | ||
format.text { content } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters