Hi
I am looking in google for long time about how to sent email with inline
image. and got this site

http://rubydoc.info/gems/mime/frames

i have installed gem install mime
its installed
but dont understand how to include MIME module in the code ..


"The following examples imply that the MIME module is included."

i am trying

require 'rubygems'
require 'mime'
msg = Message.new                     # creates a blank message with
date and message ID headers
  msg.date = (Time.now - 3600).rfc2822  # specify a different date
  msg.subject = 'This is important'
  msg.headers.add('X-Priority', 'high')  # custom header

  msg.body = TextMedia.new('hello, it is me!')
  #
  # The following snippets are equivalent to the previous line.
  #
  #   msg.body = "\r\nhello, it is me!"
  #   msg.header.add('Content-Type', 'text/plain; charset=us-ascii')
  #
  #   --OR--
  #
  #   msg.body = "Content-Type: text/plain;
charset=us-ascii\r\n\r\nhello, it is me!"

  msg.to = {
    'test / gmail.com' => Fosiul,               # no name display
    'test / gmail.com' => 'Fosiul',
    'test / gmail.com' => 'Fosiul',
  }
  msg.from = {
    'test / gmail.com' => 'Boss Man'
  }

  msg.to_s  # ready to be sent via SMTP


but

i get  "uninitialized constant Message (NameError) "

problem is, how  to refer that  in the script ?

thanks

-- 
Posted via http://www.ruby-forum.com/.