Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sendMail(user, pw, from, recipients, subject, body) {
- new AntBuilder().mail(
- mailhost: 'smtp.gmail.com',
- mailport: '465',
- ssl: 'on',
- user: user,
- password: pw,
- from: from,
- toList: recipients,
- subject: subject,
- message: body
- )
- }
- sendMail('GMAIL_USERNAME', 'GMAIL_PASSWORD', 'from@domain.com', 'sendto@domain.com', 'Subject可以用中文', 'Content可以用中文, too')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement