lib/roda/plugins/mailer.rb in roda-3.69.0 vs lib/roda/plugins/mailer.rb in roda-3.70.0

- old
+ new

@@ -184,11 +184,11 @@ # to the email, as well as adding the response body to the email. # Return the email unless no body was set for it, which would indicate # that the routing tree did not handle the request. def finish if m = mail - header_content_type = @headers.delete('Content-Type') + header_content_type = @headers.delete(RodaResponseHeaders::CONTENT_TYPE) m.headers(@headers) m.body(@body.join) unless @body.empty? mail_attachments.each do |a, block| m.add_file(*a) block.call if block @@ -239,10 +239,10 @@ def initialize(env) super if mail = env['roda.mail'] res = @_response res.mail = mail - res.headers.delete('Content-Type') + res.headers.delete(RodaResponseHeaders::CONTENT_TYPE) end end # Delay adding a file to the message until after the message body has been set. # If a block is given, the block is called after the file has been added, and you