I really don't know where to start with this one, but I am (first time) using Net::IMAP
and I am getting the following error:
NameError in EmailsController#connect
uninitialized constant Net::IMAP
Extracted source (around line #4):
2
3 def connect
4 imap = Net::IMAP.new('outlook.office365.com')
5 imap.authenticate('LOGIN', '**@**.com', '**')
6 imap.examine('INBOX')
7 @emails = imap.search(["RECENT"])
Not really sure what is going on here, I don't have to have anything in my Gemfile.rb
? Or anything else before I set the imap
variable?
You need to require 'net/imap'
at the top of the file to bring Net::IMAP
into scope.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With