Webview email link (mailto)

You have to create a subclass of WebViewClient and override mailto URL loading. Example: public class MyWebViewClient extends WebViewClient { private final WeakReference<Activity> mActivityRef; public MyWebViewClient(Activity activity) { mActivityRef = new WeakReference<Activity>(activity); } @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url.startsWith(“mailto:”)) { final Activity activity = mActivityRef.get(); if (activity != null) { MailTo …

Read more

Use as a button and trigger a mailto when it is clicked

Try this, and tell me if works. (If not, I will delete answer.) <script> function sendEmail() { window.location = “mailto:xyz@yourapplicationdomain.com”; } </script> <div onclick=”sendEmail();”>Send e-mail</div> It is possible to pass the parameters subject and body, but I think that it is not possible to format the text: <a href=”https://stackoverflow.com/questions/19639900/mailto:xyz@yourapplicationdomain.com?subject=Me&body=Hello!”>EMAIL</a>

Mailto: Body formatting [duplicate]

Use %0D%0A for a line break in your body How to enter line break into mailto body command (by Christian Petters; 01 Apr 2008) Example (Demo): <a href=”https://stackoverflow.com/questions/11507387/mailto:someone@example.com?subject=Suggestions&body=name:%0D%0Aemail:”>test</a>​ ^^^^^^

Effective maximum mailto: body lengths

The standard doesn’t define a maximum length, leaving implementation up to browsers and mail clients (See IETF RFC 2368). Microsoft products do have set limits: IE GET limit is 2,083 http://support.microsoft.com/kb/208427 Outlook express: 456 characters http://support.microsoft.com/kb/q182985/ Other browsers are likely to work up to lengths beyond that of a reasonable email body. The iPhone doesn’t …

Read more

Send mail to multiple receiver with HTML mailto [duplicate]

“There are no safe means of assigning multiple recipients to a single mailto: link via HTML. There are safe, non-HTML, ways of assigning multiple recipients from a mailto: link.” http://www.sightspecific.com/~mosh/www_faq/multrec.html For a quick fix to your problem, change your ; to a comma , and eliminate the spaces between email addresses <a href=”https://stackoverflow.com/questions/13765286/mailto:person1@domain.example,person2@domain.example”>Email Us</a>

mailto using javascript

No need for jQuery. And it isn’t necessary to open a new window. Protocols which doesn’t return HTTP data to the browser (mailto:, irc://, magnet:, ftp:// (<- it depends how it is implemented, normally the browser has an FTP client built in)) can be queried in the same window without losing the current content. In …

Read more