I have a script that I''m using to try to send an email with an
attachment but for some reason I can''t get both the HTML part of the
email to show at the sametime as the attachment to be in the email.
Here is my code
[code]
Pony.mail(
:to => to,
:from => ''Me
<me-BUHhN+a2lJ4@public.gmane.org>'',
:subject => html_entity_decoder.decode(options[:subject]),
:html_body => "#{options[:body]}".html_safe,
:attachments => {File.basename("#{attachment}") =>
File.read("#{attachment}")},
:headers => { "Content-Type" =>
"multipart/mixed",
"Content-Transfer-Encoding" => "base64",
"Content-Disposition" =>
"attachment" },
:via => :smtp,
:via_options => {
:address => ADDRESS,
:port => ''25'',
:enable_starttls_auto => true,
:user_name => USERNAME,
:password => PWD,
:authentication => :plain,
:domain => DOMAIN
}
)
[/code]
I have no idea what is wrong and I have followed all of the
tutorials/examples out there on google but nothing has worked
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.