Search code examples
javascriptemailsencha-touch-2html-emailmailto

Sencha Touch - email button


I need a mail button in my Android application, that opens a standard email form with filled To, Subject (can be edited) and Message fields. It's kind of a refer-a-friend email. How to make it? All I've found is:

listeners: {
    tap: {
        fn: function() {
            console.log('button tapped');
            window.open('mailto:webmaster@example.com');
        },
        element: 'element'
    }
},

Unfortunately, I don't know how to implement html text and subject in it.

So, what's the solution?

Thank you.


Solution

  • I would try

    mailto:address@domain.com?Subject=subject&body=message

    but I'm not sure it works on every OS