Pither.com / Simon
Development, systems administration, parenting and business

grails-mail patch for envelopeFrom (VERP)

I have previously written about setting envelope senders when sending email in grails and following comments made on that post I did actually get around to submitting a patch to the plugin.

However a change to that patch was suggested and before I managed to implement it, the mail plugin underwent a fairly large refactoring which meant I needed to completely rework my patch.

The refactoring did actually make my updated patch much simpler though and I have now got it all written, complete with test coverage (my first go at using GreenMail - which I quite like).

This time around my patch adds an envelopeFrom method to the sendMail closure...

sendMail {
    envelopeFrom 'verp-fred=smith.com@example.com'
    from 'abc@example.com'
    to 'fred@smith.com'
    subject 'Important email'
    body ...
}

You can find my version of the grails mail plugin forked on github and hopefully it will be pulled into the main plugin soon.

It's already in production and working well at SupaJam (sending about 50,000 emails per week).

Comments

On Nov. 19, 2013, 2:08 p.m. Jan said...

Hi,
Ok, it has been more than 2 years since this has been published.
I assume your changes have not been pulled in yet. Any idea if it is ever going to happen?

Or should I just use props = ["mail.smtp.from" ... when configuring mail?

Thanks,
Jan

Add a comment