I have my application sending mail on click of a link./
Any way that i can customize this app to send mail with an attachment.
Belwo is my controller code and service code
Controller code
def list = {
params.max = Math.min(params.max ? params.int('max') : 10, 100)
[challengeInstanceList: Challenge.list(params), challengeInstanceTotal: Challenge.count()]
}
Service Code:'
def mailTest() {
println("in service")
mailService.sendMail {
multipart true
to "[email protected]"
from "[email protected]"
cc "[email protected]"
bcc "[email protected]"
subject "Test Mail"
body 'Test Mail.'
} }
Any Inputs??