FIX: cleanup aliases in email From and Reply-to fields to prevent Bad sender address syntax errors

This commit is contained in:
Neil Lalonde
2014-08-08 13:35:25 -04:00
parent 3b76fd82fd
commit 50ac4c6336
3 changed files with 23 additions and 3 deletions

View File

@@ -21,4 +21,9 @@ module Email
email.downcase
end
def self.cleanup_alias(name)
# TODO: I'm sure there are more, but I can't find a list
name ? name.gsub(/[:<>]/, '') : name
end
end