attach(String fileName, String contentType, InputStreamSource source) DSA Grails Mail. , .
import org.springframework.core.io.ByteArrayResource
...
OutputStream outputStream = new ByteArrayOutputStream()
exportService.export(type, outputStream, objects, fields, labels, formatters, parameters)
InputStreamSource inputStream = new ByteArrayResource(outputStream.bytes)
sendMail {
mutipart true
to "someone@org.com"
attach "yourfile.txt", "text/plain", inputStream
}
.
, !