fix email sending for rails 3