code-tutorial.com

The best resources for developers

How can I open a default mail program with a Subject and a Body in a cross-platform way?

<a href="mailto:someone@yoursite.com?subject=Mail from Our Site">Email Us</a> 
<a href="mailto:someone@yoursite.com?cc=someoneelse@theirsite.com">Email Us</a>
<a href="mailto:someone@yoursite.com?cc=someoneelse@theirsite.com, another@thatsite.com, me@mysite.com">Email Us</a> 
me@mysite.com?subject=Hello&cc=you@yoursite.com&bcc=her@hersite.com
<a href="mailto:abbeyvet@outfront.net?CC=spooky@outfront.net
&BCC=thomasbrunt@outfront.net&Subject=Please%2C%20I%20insist
%21&Body=Hi%0DI%20would%20like%20to%20send%20you%20
%241000000%20to%20divide%20as%20you%20see%20fit%20among
%20yourselves%20and%20all%20the%20moderators.%0DPlease%
20let%20me%20know%20to%20whom%20I%20should%20send
%20the%20check.">this link</a> 

Tags: java windows email macos

Source: By Frank Krueger as answer to the question

This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 2.5


Related code-snippets: