Grails Mail Watcher Plugin

hiteshBhatia edited this page Feb 23, 2013 · 10 revisions
Clone this wiki locally

This Plugin reads unread mails from provided mail account Id.

Usage Information

1.Installation Information

   grails install-plugin mail-watcher

or put code below in BuildConfig.groovy

   plugins {
       runtime :mailWatcher:0.1

2. Configure: The plugin needs the following properties

grails {
    mailwatcher {
        email = "_youremailId_"
        password = "_password_"
        readTimeOut = 10000
        protocol = "imaps"
        host = ""
        port = "993"
  • readTimeOut Timeout For WatcherJob

  • folderToRead This is the name of the Folder that app reads. Defaults to Inbox.Any other folder in your mail can also be specified.

  • 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

Code For Sample App can be cloned From :


  • 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