# File lib/mail/network/delivery_methods/sendmail.rb, line 81 def self.shellquote(address) # Process as a single byte sequence because not all shell # implementations are multibyte aware. # # A LF cannot be escaped with a backslash because a backslash + LF # combo is regarded as line continuation and simply ignored. Strip it. escaped = address.gsub(/([^A-Za-z0-9_\s\+\-.,:\/@])/n, "\\\\\\1").gsub("\n", '') %("#{escaped}") end