Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gmail.inbox.find(:unread).each do |mail|
- mail_subject = mail.subject
- mail_subject = mail_subject.encode('UTF-8', invalid: :replace, undef: :replace)
- mail_body = mail.text_part.body.decoded
- mail_body = mail_body.encode('UTF-8', invalid: :replace, undef: :replace)
- mail_sender = mail.from.last.mailbox + "@" + mail.from.last.host
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement