Hello , I got trouble here and need assist here ! All I wanna do is to send a [text/html] content-typed mail I want to use the [send_data] method to send the pic(id = 1 , name =''aa'' , data<blob type>, type= ''jpeg'') from my database ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class MyMailer < ActionMailer::Base def send() @subject = ''this is a test of my mailing system'' @body = {:pic=>show} @recipients = ''receiver-/nLXhhjtnf1BDgjK7y7TUQ@public.gmane.org'' @from = ''sender-ZGR5WqSOjRE@public.gmane.org'' @sent_on = Time.now @headers = {} @content_type = "text/html" end def show @picture = Picture.find(1) send_data( @picture.data, :filename=>@picture.name, :type=>@picture.content_type, :dispotion=>"inline" ) end ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # this is send.erb , Dear this is a testing letter , to see if i can send a pic via a mail <%= @pic %> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ surely won''t work eh? but could I know what can we do to make it work --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 22 May 2008, at 10:31, stone wrote:> Hello , I got trouble here and need assist here ! > > All I wanna do is to send a [text/html] content-typed mail > > I want to use the [send_data] method to send the pic(id = 1 , name > =''aa'' , data<blob type>, type= ''jpeg'') from my databaseSimple google search: rails html mail inline images http://www.caboo.se/articles/2006/02/19/how-to-send-multipart-alternative-e-mail-with-inline-attachments http://blog.jebelev.com/2007/10/how-to-send-inline-images-with-action.html http://blog.thoughtobject.com/2007/05/26/5/ Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hello , thanks for your help , but this method is out of date :( It wont wokr on rails 2.0 , or function imcomplete (link 2) inline attachment can work , right now I''m trying On May 22, 5:45 pm, Peter De Berdt <peter.de.be...-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote:> On 22 May 2008, at 10:31, stone wrote: > > > Hello , I got trouble here and need assist here ! > > > All I wanna do is to send a [text/html] content-typed mail > > > I want to use the [send_data] method to send the pic(id = 1 , name > > =''aa'' , data<blob type>, type= ''jpeg'') from my database > > Simple google search: rails html mail inline images > > http://www.caboo.se/articles/2006/02/19/how-to-send-multipart-alterna...http://blog.jebelev.com/2007/10/how-to-send-inline-images-with-action...http://blog.thoughtobject.com/2007/05/26/5/ > > Best regards > > Peter De Berdt--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---