Installation

It copies a template of rockdove server under you script folder which contains the following snippet:

# ...Rockdove::Config.configure do |config|
config.ews_url 'https://ewsdomain.com/ews/exchange.asmx'
config.ews_username 'ews_username'
config.ews_password 'ews_password'
config.ews_folder 'Inbox'# ews_folder is Inbox by default# by default, it deletes the mail after processing, # mention ews_archive_folder if it has to be archived to a different folder
config.ews_archive_folder 'Archive'
config.ews_watch_interval 60# by default, the polling interval is 60end# ...Rockdove::CollectMail.watch do |rockdove_parsed_mail|
beginModel.method(rockdove_parsed_mail)
# As per your application requirements, refer the options that you can play with here,# http://rdoc.info/github/kiranh/rockdove/Rockdove/ExchangeMailrescueException => e
Rockdove.logger.error "Exception occurred while receiving message:#{rockdove_parsed_mail}"Rockdove.logger.error [e, *e.backtrace].join("\n")
endend

You need to change the Model into the one being used in your project that would require this behavior of Mail Processing for Exchange Web Services 1.0 and further process the mail as per the requirements in your project.

And then you can run the script in console mode, ^C will stop it, calling the stop method

$ ruby ./script/rockdove_server.rb start #from your project root

or run it daemonized, by default ./rockdove_server.log and ./rockdove_server.pid will be created