[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Sending email w/ attachments

Mike Wernsing

5/3/2005 2:14:00 AM

I have been following the following how-to with no success:

http://wiki.rubyonrails.com/rails/show/HowToSendEmailsWithAc...

The following section is what seems to be giving me trouble:

mail.set_content_type('multipart', blah blah)
mail.parts << my_attachment

Questions:
1) Am I setting the content type for the attachment I am about to append?
2) What is my_attachment supposed to be, a filesystem object?

Ultimately the script is failing at this portion of code:

Mailer::deliver(mail)

With the following error message:

undefined method `accept' for <File:/path/to/file>

Any help would be much appreciated.