#!/usr/bin/env ruby -w # encoding: UTF-8 # # = exchangebug.rb -- The TaskJuggler III Project Management Software # # Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011 # by Chris Schlaeger # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # require 'mail' Mail.defaults do delivery_method :smtp, { :address => 'storexbh1.amd.com', :port => 25 } end mail = Mail.deliver do #to [ 'Test.STOREXPF1@amd.com', 'Test.Storexmbp01@amd.com', 'dl.xadm-in@amd.com' ] to 'Chris.Schlaeger@amd.com' from 'timesheets@taskjuggler.amd.com' subject 'Mail that gets corrupted by Exchange Server' text_part do content_type [ 'text', 'plain', { 'charset' => 'UTF-8' } ] content_transfer_encoding 'quoted-printable' body "This is the plain text part.\nCorrupted mails no longer have this content." end html_part do content_type 'text/html; charset=UTF-8' content_transfer_encoding 'quoted-printable' body "

This is the HTML part.\nCorrupted mails have this text in the text/plain part as well.

" end end #mail.deliver puts "The following mail has been sent out:\n" puts mail.to_s