code refactoring for mail.rb
move all source images to CDN and change the workflow for image