# Action Mailer Errno::EPIPE using different character sets

**URL:** <https://www.ruby-forum.com/t/action-mailer-errno-epipe-using-different-character-sets/59622>\
**Category:** Rails\
**Created:** [May 4, 2006, 7:34pm UTC](https://www.ruby-forum.com/t/action-mailer-errno-epipe-using-different-character-sets/59622 "2006-05-04T19:34:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joachimgross](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/258eb7/32.png) [@joachimgross](https://www.ruby-forum.com/u/joachimgross)\
**Post date:** [May 4, 2006, 7:34pm UTC](https://www.ruby-forum.com/t/action-mailer-errno-epipe-using-different-character-sets/59622/1 "2006-05-04T19:34:03Z")

</div>

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 = 'removed_email_address@domain.invalid'
	@from = 'removed_email_address@domain.invalid'
	@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.
