I am doing automation using Watir, which creates an email that I need to check. I was listed as a mailbox as the easiest way to do this.
I have added the following code and can receive the first email from my inbox.
require 'mail' require 'openssl' Mail.defaults do retriever_method :pop3, :address => "email.someemail.com", :port => 995, :user_name => 'domain/username', :password => 'pwd', :enable_ssl => true end puts Mail.first
I am new to this forum and ask the following questions:
How can I get all unread emails? I tried Mail.all
, Mail.first
, Mail.last
, but nothing returns an unread email.
How can I get all the links that are inside emails? Or the body of a mail message from a specific email? I need to receive the email of the first unread message.
How can I receive emails from a specific folder if I have subfolders inside my mailbox?
source share