2 followers Follow

Add a javascript API by which HTML widgets can send email

I have a number of HTML widgets that need to send an email with pre-populated subject & body. Imagine a survey widget for example, where the reader fills in the data and pushes a button to submit his results to the author via email.

Right now, the only way to achieve this is by setting up a webserver and doing a HTTP POST to that server with the data. The server then sends the email. This is quite cumbersome.

It would be very useful if Mag+ would add a simple javascript API that HTML widgets can call to open up a "compose email" window. The API should allow to pre-populate the recipient, subject, body, etc. It should further allow for HTML bodies, not just plain text, so we can make sure the email looks nice.

Something like this:


    'to': '',

    'subject': 'Survey results from ' + firstname,

    'htmlbody': '<b>Survey results</b>...'




Please sign in to leave a comment.

1 comment