Question: I've searched around for a bit, but haven't been able to find anything useful on this.

How do browsers communicate with email programs, such as Thunderbird and Outlook (on the Mac, if that's relevant)?

By communicate, I mean the process it goes through to create a new email window with a designated to address, subject, body, through the mailto: link. How does the browser let the email program know what to put for each field? Using the command line (for Thunderbird, at least) didn't make much sense, as that opens a brand new instance of Thunderbird on the Mac.

I haven't found any sort of API for this, so if someone can point me in the right direction, that would be greatly appreciated. Thanks!

Answer: 
the additional information sent to the mail client is usually (from what i have seen) tacked onto the back of the mailto command. 

in the following example, the client should automatically fill in the subject as 'greetings from stackoverflow'

```
mailto:hello@example.com?subject=greetings from stackoverflow

```

i have listed the other commands i know of below:

to edit subject: `?subject=`   

to edit cc: `?cc=`   

to edit bcc: `?bcc=`   

to edit body content: `?body=`   

these can also be used together by placing them after eachother and swapping the '?' for a '&', example

```
mailto:hello@example.com?subject=hello there&body=goodbye

```

this should create an email with the subject of 'hello there' and a body message of 'goodbye'

i hope this helps!
A very useful oldies that explains the surface called [RCDefault](http://www.rubicode.com/Software/RCDefaultApp/)

It shows you that the Finder or the Browser uses (can use) URLs to call other applications. 

I am attaching the screenshot for the Mail application on OSX here:

![mail application url schemes](https://i.stack.imgur.com/0ug1n.png) 

The OS will then call this application with the URL (or file) and the application is supposed to understand how to open that URL.
The URL scheme for the mailto protocol for apple, is [here](https://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MailLinks.html)

You should be able to find other schemes for the application you need to use.