Created
March 18, 2012 13:29
-
-
Save gr2m/2072323 to your computer and use it in GitHub Desktop.
Imagine ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// imagine ... | |
app.email.send({ | |
to : '[email protected]', | |
subject : 'Email Attachments', | |
body : { | |
text: 'Find the screenshot attached', | |
html: "This is how we do it:\n" | |
+ "{{ attachments['screenshot.png'] }}" | |
}, | |
attachments : [ | |
app.convert.html({ | |
to : 'png', | |
input : html_code, | |
output : 'screenshot.png' | |
}) | |
] | |
}).done( function() { | |
alert( "email sent!" ); | |
}) | |
// ... this would just work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Power to the Frontend! Come by, grab a beer, and discuss with us:
http://techup.ch/594/jszurich-couchapp-power-to-the-frontend