I wanted the ability to attach files that have dynamic content (i.e. created in memory) to an SES email. In my case I need to add a calendar event created on the fly using the ic-alendar grails plugin as an .ics file). Currently there's only support for attaching Files resident on the local file system (and I don't want to go through the messy business of writing out files on the fly).
You can add byte attachments using:
attach "[filename]", "[content type]", [attachment bytes]
subject "test mail with byte attachment"
attach "filename.txt", "text/plain", "Some text in a file".getBytes('UTF-8')
Please create a pull request and I will merge this in.
I merged this in and released 220.127.116.11