Grails mail plugin 0.4 released, as well as the first “Grails Rocks” screencast

Posted by: on Sep 25, 2008 | 10 Comments

I released version 0.4 of the grails-mail plugin in the Grails plugin repo the other day, but have not posted about it as I’ve been busy working on-site. I’ve also been putting together a screencast that shows how to use the plugin in the most basic scenario and also render content from GSPs from within services.

To install the plugin, which adds support for rendering the mail body from a GSP from within a controller, service or job, run: grails install-plugin mail

Full docs for the mail plugin are here.

To view the “Using the Grails mail plugin” screencast, click on the thumbnail or go to the fledgling “Grails Rocks” page.

This is the first Grails Rocks screencast, but I hope to do many more. The next one is already planned, for the forthcoming release of the Email Confirmation plugin – which was dependent on this mail plugin 0.4 release.

10 Comments

  1. Wanari
    September 26, 2008

    This plugin is very interesting, many thanks for the contribution :-) i think many people will adopt it, i have a few questions about it :

    1- Is it possible to load mail sender configuration from database using GORM?

    2- Is mail sending synchronous or asynchronous?

    Reply
  2. Marc Palmer
    September 26, 2008

    Hi Wanari -

    Let me clarify – grails-mail is not “my” plugin, its an effort by Jeff Brown, Graeme Rocher and myself to just get some quick mail mechanisms together for Grails.

    As for your questions:

    1) I’m not sure what you mean by “mail sender configuration”. It is unusual for applications to send mail to multiple SMTP servers…

    2) synchronous currently

    Reply
  3. Wanari
    September 27, 2008

    Hi Marc

    Thanks for the clarification and the answers!

    For the question 1) i meant the scenario where the smtp configuration is available on a web view. The goal is to provide these settings to the end user/sysadmin for a later change (changed password, changed server name, etc.) without letting them mess with Config.groovy (and maybe without the need to restart webap too).

    Reply
  4. Marc Palmer
    September 27, 2008

    Wanari -

    Sorry no the plugin does not support this yet. We need to add a mechanism to supply the remote host info when calling sendMail. I will put it on the todo list.

    Reply
  5. Dustin Whitney
    October 3, 2008

    That’s some wicked rad theme music

    Reply
  6. Marc Palmer
    October 5, 2008

    Dustin – thanks, its not my own. See http://www.cardiacs.com

    Reply
  7. Gabriele Prandini
    October 15, 2008

    Thanks for the this screencast… it helped me… but get a problem with sending email with gsp…
    look here: http://www.nabble.com/mime.DefaultAcceptHeaderParser-No-configured-mime-types-found-for-Accept-header-in-Mail-Plugin-td19975623.html

    Reply
  8. Ryan
    November 9, 2009

    Hi there
    Any update on the planned Email Confirmation Plugin screencast… I have been struggling with it — particularly the defined event handers in Bootstrap (emailConfirmationService.onConfirmation) don’t seem to be getting called..

    Reply
  9. Ryan
    November 9, 2009

    It appears as though there is a bug in the email confirmation plugin (unless Im missing something). I currently have grails.app.context = “/” set in Config.groovy — so basically my urls don’t include the webapp. However, the plugin is including the context in the confirmation URLs that it creates.

    Reply

Leave a Reply