Skip to content

Instantly share code, notes, and snippets.

@gr2m
Created March 18, 2012 13:29
Show Gist options
  • Save gr2m/2072323 to your computer and use it in GitHub Desktop.
Save gr2m/2072323 to your computer and use it in GitHub Desktop.
Imagine ...
// imagine ...
app.email.send({
to : 'joey@example.com',
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
@gr2m
Copy link
Author

gr2m commented Mar 18, 2012

Power to the Frontend! Come by, grab a beer, and discuss with us:
http://techup.ch/594/jszurich-couchapp-power-to-the-frontend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment