# Mailer Extension - How do I attach a file?

**URL:** <https://www.ruby-forum.com/t/mailer-extension-how-do-i-attach-a-file/90338>\
**Category:** Radiant CMS\
**Created:** [March 27, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/mailer-extension-how-do-i-attach-a-file/90338 "2007-03-27T23:36:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nolic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/13edae/32.png) [@nolic](https://www.ruby-forum.com/u/nolic)\
**Post date:** [March 27, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/mailer-extension-how-do-i-attach-a-file/90338/1 "2007-03-27T23:36:13Z")

</div>

Hi All,

Im trying to do a form where users can submit their resume (attach a  
file) to the form submission.

When I use the form, it works, but the attachment does not get sent  
and I get what looks to be a memory address or something like that?.  
Is this a bug in the mailer extension? The resulting email I received  
as well as my mailer page code is below:

From: removed\_email\_address@domain.invalid  
Subject: website - Job Application  
Date: March 27, 2007 5:21:07 PM EDT  
To: removed\_email\_address@domain.invalid  
Mime-Version: 1.0  
Content-Type: multipart/alternative;  
boundary=mimepart\_46098ac36f4f\_c271ae12ca2b  
Message-Id: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Name: colin  
E-mail: removed\_email\_address@domain.invalid  
Subject:  
Message: test  
Attachment: #StringIO:0x35a532c

=========

#body page part  
\<r:mailer:form name=“contact”\>  
Name:  
  
\<r:mailer:text name=“name” /\>  
  
E-mail:  
  
\<r:mailer:text name=“email” /\>  
  
Resume:  
  
\<r:mailer:file name=“resume” /\>  
  
Message:  
  
\<r:mailer:textarea name=“body” /\>  
  
\<r:mailer:submit value=“Send” /\>  
\</r:mailer:form\>

#config page part  
mailers:  
contact:  
subject: website - Job Application  
from: removed\_email\_address@domain.invalid  
redirect\_to: /careers/thanks  
recipients:  
- removed\_email\_address@domain.invalid

#email page part  
Name: \<r:mailer:get name=“name”/\>  
E-mail: \<r:mailer:get name=“email”/\>  
Subject: \<r:mailer:get name=“subject”/\>  
Message: \<r:mailer:get name=“body”/\>  
Attachment: \<r:mailer:get name=“resume” /\>

* * *

---

<div class="post-metadata">

**Author:** ![nolic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/13edae/32.png) [@nolic](https://www.ruby-forum.com/u/nolic)\
**Post date:** [March 28, 2007, 12:36am UTC](https://www.ruby-forum.com/t/mailer-extension-how-do-i-attach-a-file/90338/2 "2007-03-28T00:36:25Z")

</div>

Durr. Im an idiot. In the readme it says:

Todo:  
…

- Support for file attachments to emails  
…

Colin
