The 'Content-Transfer-Encoding' setting is set to '7bit' by default. The mail server Postfix is breaking down the email header by bunch of 1000 caracteres, meaning that if you have a long email (using HTML for example), you end up having spaces in the middle of your text or links. (See this thread for more info: http://tech.groups.yahoo.com/group/postfix-users/message/273296)
Following the Rails ActionMailer documentation (http://api.rubyonrails.org/classes/ActionMailer/Base.html), adding the following code to my app file should make it, but it doesn't work:
ActionMailer::Base.default 'Content-Transfer-Encoding' => 'quoted-printable'
I still end up with the default:
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_50166adf1e043_1b9810829142282d";
charset=UTF-8
Content-Transfer-Encoding: 7bit
My email look like that:
def new_registered_user(user_id)
@user = User.find(user_id)
set_locale @user.locale
mail(
:subject => i18n_subject,
:to => @user.email_with_name
) do |format|
format.text { render :layout => 'text_email' }
format.html
end
end
Any idea on what else should I change?