Joachim Gross
2006-May-04 17:34 UTC
[Rails] Action Mailer Errno::EPIPE using different character sets
1. On my Windows development system everything is fine. 2. On my Linux production server I get an Errno::EPIPE (Broken pipe) error when sending an email using Action Mailer. The specific situation is this: a) Rails 1.1.2 b) The application is running UTF8, but I want to send my emails as ISO-8859-1. c) Sending UTF-8 emails works fine. d) Delivery method is SMTP. e) When using this code ------------- def confirm(uuid, user, shop) @subject = "Shop-Anmeldung bei uns" @body[''uuid''] = uuid @body[''user''] = user @body[''shop''] = shop @recipients = user.name @bcc = ''shop.registration@xxx.de'' @from = ''info@xxx.de'' @sent_on = Time.now @headers = {} @charset = "iso-8859-1" end ------------- and including German Umlauts (??? etc.) in the template (saved as ISO8859-1) I get the above error. As soon as I change my template to not include any Umlauts all works fine. It seems that my @charset setting is ignored. 3. The top portion of the call stack looks like this: usr/local/lib/ruby/1.8/net/protocol.rb:266:in `write'' /usr/local/lib/ruby/1.8/net/protocol.rb:266:in `write0'' /usr/local/lib/ruby/1.8/net/protocol.rb:280:in `write_message_0'' /usr/local/lib/ruby/1.8/net/protocol.rb:277:in `each_crlf_line'' /usr/local/lib/ruby/1.8/net/protocol.rb:311:in `adding'' /usr/local/lib/ruby/1.8/net/protocol.rb:335:in `step'' /usr/local/lib/ruby/1.8/net/protocol.rb:335:in `adding'' /usr/local/lib/ruby/1.8/net/protocol.rb:311:in `each_crlf_line'' /usr/local/lib/ruby/1.8/net/protocol.rb:277:in `write_message_0'' /usr/local/lib/ruby/1.8/net/protocol.rb:229:in `write_message'' /usr/local/lib/ruby/1.8/net/protocol.rb:228:in `using_each_crlf_line'' /usr/local/lib/ruby/1.8/net/protocol.rb:290:in `writing'' /usr/local/lib/ruby/1.8/net/protocol.rb:290:in `using_each_crlf_line'' /usr/local/lib/ruby/1.8/net/protocol.rb:228:in `write_message'' /usr/local/lib/ruby/1.8/net/smtp.rb:473:in `sendmail'' /usr/local/lib/ruby/1.8/net/smtp.rb:472:in `send0'' /usr/local/lib/ruby/1.8/net/smtp.rb:548:in `critical'' /usr/local/lib/ruby/1.8/net/smtp.rb:548:in `send0'' /usr/local/lib/ruby/1.8/net/smtp.rb:472:in `sendmail'' /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.2.1/lib/action_mailer/base.rb:449:in `perform_delivery_smtp'' /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.2.1/lib/action_mailer/base.rb:447:in `start'' /usr/local/lib/ruby/1.8/net/smtp.rb:316:in `start'' /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.2.1/lib/action_mailer/base.rb:447:in `perform_delivery_smtp'' /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.2.1/lib/action_mailer/base.rb:333:in `send'' /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.2.1/lib/action_mailer/base.rb:333:in `deliver!'' /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.2.1/lib/action_mailer/base.rb:258:in `deliver'' Is what I am doing totally stupid? Am I missing any config settings. Any help would be much appreciated. -- Posted via http://www.ruby-forum.com/.