# Badly formatted E-Mail with ActionMailer

**URL:** <https://www.ruby-forum.com/t/badly-formatted-e-mail-with-actionmailer/149855>\
**Category:** Rails\
**Created:** [September 30, 2008, 4:19pm UTC](https://www.ruby-forum.com/t/badly-formatted-e-mail-with-actionmailer/149855 "2008-09-30T16:19:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![overbryd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/d9b06d/32.png) [@overbryd](https://www.ruby-forum.com/u/overbryd)\
**Post date:** [September 30, 2008, 4:19pm UTC](https://www.ruby-forum.com/t/badly-formatted-e-mail-with-actionmailer/149855/1 "2008-09-30T16:19:59Z")

</div>

Hello,

I’ve setup up Mailing on my Rails app. The setup uses smtp with  
(tested) correct settings.  
But all the mails sent through UserMailer have no subject and look  
like this:

(Begin)  
#Debian-40-etch-64-minimal.tmail\>  
Subject: [www.paperc.de](http://www.paperc.de) - Deine Registrierung bei PaperC!  
Mime-Version: 1.0  
Content-Type: text/plain; charset=utf-8

[…](Content stripped)

Could you please help me how to solve this problem?

---

<div class="post-metadata">

**Author:** ![overbryd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/d9b06d/32.png) [@overbryd](https://www.ruby-forum.com/u/overbryd)\
**Post date:** [October 1, 2008, 10:58am UTC](https://www.ruby-forum.com/t/badly-formatted-e-mail-with-actionmailer/149855/2 "2008-10-01T10:58:05Z")

</div>

Hy,

I could solve the problem!  
There was a wrong entry in my /etc/hostname file.  
It looked like this:

(Begin)  
[www.example.com](http://www.example.com)  
#Debian-40-etch-64-minimal  
(End)

I’ve solved this issue by setting the correct hostname, using the `$ hostname www.example.com` command.  
Cheers,

Lukas Rieder
