0

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:aaa@company.com">test</a> 
    </p>
  </body>
</html>
Jack Moody
  • 1,590
  • 3
  • 21
  • 38
chun xu
  • 393
  • 1
  • 4
  • 13
  • Possible duplicate of [Can I set subject/content of email using mailto:?](https://stackoverflow.com/questions/4782068/can-i-set-subject-content-of-email-using-mailto) – Syfer Nov 05 '18 at 23:51

1 Answers1

2

You need to do the following:

<a href="mailto:aaa@company.com?subject=Testing out mailto!">test</a>

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

<a href="mailto:aaa@company.com?subject=Testing email&bcc=bcc_email@gmail.com&cc=cc_email@gmail.com">test</a>

See more details on this method here.

Jack Moody
  • 1,590
  • 3
  • 21
  • 38