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.
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.”