The configuration item sets the "default" from address for outgoing messages. The plugin provides a DSL that is used to specify the components of the message, including a specific From address if you want. If you don't provide a from specification in the message DSL, then it uses the configuration specified value.
Here is a snippet of code that I use in my messaging system to set a user account supplied from address on outgoing messages:
mailMessage = mailService.sendMail {
multipart true
if (toAddresses) { to toAddresses }
if (ccAddresses) { cc ccAddresses }
if (bccAddresses) { bcc bccAddresses }
from messageSpecification.from
subject messageSpecification.subject
if (messageSpecification.plainText) { text messageSpecification.plainText }
if (messageSpecification.htmlText) { html messageSpecification.htmlText }
messageSpecification.attachments.each {
attach(it.filename, it.mediaType, it.data)
}
}
Simply replace the messageSpecification.from reference to your specific from address and you are good to go.