griffon.plugins.mail
[Groovy] Class MailSender
java.lang.Object
griffon.plugins.mail.MailSender
- All Implemented Interfaces:
- MailProvider
@Singleton
class MailSender
extends Object
Sends email from a Griffon application.
- Authors:
- Josh A. Reed
|
Method Summary |
void
|
sendMail(Map args)
Send an email using the arguments specified.
|
MailSender
MailSender()
-
sendMail
void sendMail(Map args)
- Send an email using the arguments specified. The following arguments are recognized:
- transport - either 'smtp' for regular SMTP or 'smtps' for SMTP with SSL. Defaults to 'smtp'
- mailhost - (required) the address of the SMTP server, e.g. 'smtp.google.com'
- port - the port of the SMTP server. Defaults appropriately for the transport specified.
- auth - true if authentication is required, false otherwise. Defaults to false (no auth).
- user - the username for authenticating with the SMTP server.
- password - the password for authenticating with the SMTP server.
- from - the message sender, e.g. 'foo@bar.com'
- to - (required) the message recipients, e.g. 'foo@bar.com'. Multiple addresses may be specified as a comma-separated list.
- cc - the CC recipients, e.g. 'foo@bar.com'. Multiple addresses may be specified as a comma-separated list.
- bcc - the BCC recipients, e.g. 'foo@bar.com'. Multiple addresses may be specified as a comma-separated list.
- subject - the message subject.
- text - the plain text message content.
- html - the html message content.
- attachments - the list of file paths to attach to the message.
Future versions of this service will support HTML and file attachments.
Groovy Documentation