Open flopezd opened 8 years ago
As a work around, I've done the following to add the images property to the metaClass of MandrillMessage and included it in the JSON serialization.
in BootStrap.groovy:
org.grails.mandrill.MandrillMessage.metaClass.images = []
grails.converters.JSON.registerObjectMarshaller(org.grails.mandrill.MandrillMessage) {
def val = it.properties.findAll {k,v -> k != 'class'}
val.images = it.images
return val
}
Then, elsewhere something like:
message.images = [
[ type: 'image/png',
name: 'logo',
content: logo.encodeBase64().toString()
]
]
Hello, there is any way to send an inline image(encoding base64) to the template. This is supported by the api (https://mandrillapp.com/api/docs/messages.html), but i cant find the way to do it. Thanks!