Created
September 15, 2010 05:21
-
-
Save smsohan/580272 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Instead of the following | |
Mail::Configuration.instance.retriever_method :pop3, pop3_options_hash | |
Mail.all.each do |mail| | |
... | |
end | |
#I would like to write one of the following | |
#1. The following line will instantiate a receiver using the global config | |
email_receiver = Mail::Receiver.new | |
#2. However, this one will only initialize the instance with specific options | |
email_receiver = Mail::Receiver.new :pop3, pop3_options_hash | |
#3. One can also take a hybrid approach, that is starting with the defaults and making customization as follows | |
email_receiver = Mail::Receiver.new | |
email_receiver.user_name = 'my_custom_inbox@example.org' | |
email_receiver.enable_ssl = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment