Fixed localized emails with implicit content types

The pull request also contains a commit you have already cherry picked and a minor commit updating the gitignore file.