# How to get email body in plain/text

**URL:** <https://www.ruby-forum.com/t/how-to-get-email-body-in-plain-text/98274>\
**Category:** Rails\
**Created:** [January 28, 2006, 3:44pm UTC](https://www.ruby-forum.com/t/how-to-get-email-body-in-plain-text/98274 "2006-01-28T15:44:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anatol](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@anatol](https://www.ruby-forum.com/u/anatol)\
**Post date:** [January 28, 2006, 3:44pm UTC](https://www.ruby-forum.com/t/how-to-get-email-body-in-plain-text/98274/1 "2006-01-28T15:44:33Z")

</div>

Hi, all.

I have a very simple Mailer class  
class AliasMailer \< ActionMailer::Base  
def receive(email)  
puts email.body  
end  
end

And I have problem here with TMail::Mail object that I received via  
receive() function.  
I am trying to get body of the mail but I have following text

Hello\r\n\r\n–\r\n\r\n\r\nHello\<br clear=“all”\>  
–   
h

for mail that have in body just word Hello. It means that TMail::Mail  
object  
returns body both as plain-text and html text.  
But I need only first one. What is right answer on my question??

I have sent mail from Google account that I believe sends it as html.  
But  
anyway in Mailer I need text as plain text.
