lib/roda/plugins/error_email.rb
def error_email_content(exception)
          email_opts = self.class.opts[:error_email]
          headers = email_opts[:default_headers].call(email_opts, exception)
          headers = headers.merge(email_opts[:headers])
          headers = headers.map{|k,v| "#{k}: #{v.gsub(/\r?\n/m, "\r\n ")}"}.sort.join("\r\n")
          body = email_opts[:body].call(self, exception)
          "#{headers}\r\n\r\n#{body}"
        end
# The content of the email to send, include the headers and the body.
# Takes the same argument as #error_email.
The content of the email to send, include the headers and the body.
Takes the same argument as #error_email.
The content of the email to send include the headers and the body . Takes the same argument as #error_email .
def error_email_content(exception)
          email_opts = self.class.opts[:error_email]
          headers = email_opts[:default_headers].call(email_opts, exception)
          headers = headers.merge(email_opts[:headers])
          headers = headers.map{|k,v| "#{k}: #{v.gsub(/\r?\n/m, "\r\n ")}"}.sort.join("\r\n")
          body = email_opts[:body].call(self, exception)
          "#{headers}\r\n\r\n#{body}"
        end
def error_email_content ( exception ) email_opts = self . class . opts [ :error_email ] headers = email_opts [ :default_headers ] . call ( email_opts , exception ) headers = headers . merge ( email_opts [ :headers ] ) headers = headers . map { | k , v | "#{k}: #{v.gsub(/\r?\n/m, "\r\n ")}" } . sort . join ( "\r\n" ) body = email_opts [ :body ] . call ( self , exception ) "#{headers}\r\n\r\n#{body}" end
The content of the email to send, include the headers and the body.
The content of the email to send include the headers and the body .
exception