Skip to content

Grails Mail Watcher Plugin

hiteshBhatia edited this page Feb 25, 2012 · 10 revisions

This Plugin reads unread mails from provided Gmail Id.

Usage Information

1.Installation Information

   grails install-plugin file-viewer

or put code below in BuildConfig.groovy

   plugins {
       runtime :mailWatcher:0.1
   }

2. Configure: The plugin needs the following properties

grails {
    mailwatcher {
        email = "_youremailId@gmal.com_"
        password = "_password_"
        readTimeOut = 10000
        folderToRead="INBOX"
        protocol = "imaps"
        host = "imap.gmail.com"
        port = "993"
    }
}
  • readTimeOut Timeout For WatcherJob

  • folderToRead This is the name of the Folder that app reads. Defaults to Inbox

  • protocol Protocol used for reading mail

  • host Hostname for the mail server

  • port Port to which app connects

3. To log the mails that are read, change the logging level to info

The sample-application can be found at : https://github.com/IntelliGrape/Grails-Mail-Watcher-SampleApp


RoadMap

  • Searching for mails can be based on patterns

  • Folder to look for in Mail can be given as regex

  • Can fire mail received event when a mail with specific pattern is received.


For any queries and suggestions mail me at hitesh@intelligrape.com

Clone this wiki locally