A Rubyesque interface to Gmail. Connect to Gmail via IMAP and manipulate emails and labels. Send email with your Gmail account via SMTP. Includes full support for parsing and generating MIME messages.
require 'gmail'
gmail = Gmail.new("myname@gmail.com", "mypasswd")
gmail.deliver do
to "rorocodeath@gmail.com"
subject "Having fun in Puerto Rico!"
text_part do
body "Text of plaintext message."
end
html_part do
content_type 'text/html; charset=UTF-8'
body "<p>Text of <em>html</em> message.</p>"
end
add_file __FILE__
end
I'm sure my gmail can work
following is my code
following is my log