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!"
For information about how to format a MIME mail with HTML and inline
images, see RFC 2387 and RFC 2392. RFC 2392 has an example of exactly
this:
"The following message contains an HTML body part that refers to an
image contained in another body part. Both body parts are contained
in a Multipart/Related MIME entity. The HTML IMG tag contains a
cidurl which points to the image."