# ActionMailer multipart: html, plain and attachment?

**URL:** <https://www.ruby-forum.com/t/actionmailer-multipart-html-plain-and-attachment/164103>\
**Category:** Rails\
**Created:** [March 27, 2009, 10:26pm UTC](https://www.ruby-forum.com/t/actionmailer-multipart-html-plain-and-attachment/164103 "2009-03-27T22:26:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danimal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bb73d2/32.png) [@Danimal](https://www.ruby-forum.com/u/Danimal)\
**Post date:** [March 27, 2009, 10:26pm UTC](https://www.ruby-forum.com/t/actionmailer-multipart-html-plain-and-attachment/164103/1 "2009-03-27T22:26:52Z")

</div>

Has anyone gotten emails to work where you specify the HTML and the  
plain text alternatives, but also include an attachment?

Reason I’m asking: I’m sending out event notices, styled as HTML but  
with a plain text alternative. I also want to attach the .ics file.

For some reason, I can’t get this to work. If I explicitly put in  
“multipart/mixed” (to support the attachment) it won’t do the two  
alternatives. If I explicitly put in “multipart/alternative” (to  
support the HTML and plain text parts), it won’t show the attachment.

Is this a Rails/ActionMailer issue or am I just missing something with  
how these multipart messages are supposed to be put together?

Thanks!

-Danimal
