Created
January 29, 2012 14:50
-
-
Save mresetar/1699133 to your computer and use it in GitHub Desktop.
Groovy send e-mail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@GrabConfig(systemClassLoader=true) | |
@Grapes( | |
@Grab(group='javax.mail', module='mail', version='1.4.4') | |
) | |
def ant = new AntBuilder() | |
ant.mail(mailhost:'localhost', mailport:25, subject:'Test message') { | |
from(address:'mySystem@localhost') | |
cc(address:'mySystem@localhost') | |
to(address:'tester@localhost') | |
message("Test mail sent on ${new Date()}") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment