chun xu
chun xu

Reputation: 433

Add subject line in HTML

I'm trying to add a hyperlink using HTML. When a sender clicks a link, I would like the browser to create a new email with a filled out To field and subject line.

Code

HTML

<html>
  <head></head>
  <body>
    <p>Thank you.<br>
    <a href="mailto:[email protected]">test</a> 
    </p>
  </body>
</html>

Upvotes: 0

Views: 3051

Answers (1)

Jack Moody
Jack Moody

Reputation: 1771

You need to do the following:

<a href="mailto:[email protected]?subject=Testing out mailto!">test</a>

If you would like to add a BCC and CC, you can add the following:

<a href="mailto:[email protected]?subject=Testing email&[email protected]&[email protected]">test</a>

See more details on this method here.

Upvotes: 2

Related Questions