Monthly Archives: October 2010

Quick Tip : Specify a Human readable name for addresses in the Grails Mail Plugin

When using the grails mail plugin, you can specify names for senders by using this syntax:

"Firstname Surname<address@domain.com>"

i.e,

 mailService.sendMail({
          to "somedude@gmail.com"
          from "ali baba<fortythieves@arabia.com>"
          subject "hi"
          body "open sesame"
        }
  )

and it will show up in mailboxes as:


This allows us to show up in user mailboxes as a human readable name, instead of the typical noreply addresses.

You can even use it in config.groovy,

grails.mail.default.from = "ali baba<fortythieves@arabia.com>"