Mailto is a link “address” we can set to an anchor tag to let the user send an email to someone with just a click. Something like this:
<a href="mailto:[email protected]">Send email</a>
That would show something like this:
Send email
If you click on there, and you have configured in your PC a default email software to handle it, Outlook or the software you are using will open with a blank email with just an address at the “To” field, the one written in the link. You can also configure your browser to open your Gmail/hotmail/whatever account when doing this.
Now, what if you wanted to send that email with a default subject, cc, bcc or including body? Well you can, just adding parameters as if it were an url like this:
<a href="mailto:[email protected]?subject=Default subject&[email protected]&[email protected]&body=Lets start saying this">Send email</a>
Which would look like this:
Send email
List of parameters
- subject: The email subject.
- cc: List of emails to send a copy.
- bcc: List of emails to send a hidden copy (rest of recipients will not see it).
- body: Some text to add as the email body by default. Limited to 255 characters.