Skip to content

Instantly share code, notes, and snippets.

@crusadergo
Created July 4, 2016 06:24
Show Gist options
  • Save crusadergo/1f867c904132827ca8a972e397ab91ad to your computer and use it in GitHub Desktop.
Save crusadergo/1f867c904132827ca8a972e397ab91ad to your computer and use it in GitHub Desktop.
# @fn csp_report {{{
# @brief Sends CSP report
#
# @param [Hash] blob CSP report
# @param [String] domain Domain name for multiple CSP Reports
def csp_report blob, domain
Pony.mail(
to: @admin_email,
subject: "#{ domain }:CSP Report",
body: template(__method__, {
blob: blob,
}),
)
end
# @fn invite_friend {{{
# @brief Invite friend email
#
# @param [Person] sender
# @param [String] receiver_email
# @param [String] message Additional message provided with invitation
def invite_friend sender, receiver_email, message
Pony.mail({
to: receiver_email,
subject: "Invitation from #{sender.first_name} #{sender.last_name}",
body: template(__method__, {
sender: sender,
message: message
})
})
end # }}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment