-2

Im looking for a mailto button that will have a built in message that is emailed to a preset email address.

eg: You see a button that says confirm when you click that button it sends an email message directly from the browser to the email address with a message that says confirmed.

Arun Bertil
  • 4,598
  • 4
  • 33
  • 59
Brandon
  • 103
  • 1
  • 1
  • 7
  • The browser can't do this directly. It can either open the user's mail client, or it can send a request to a server script that does it. – Barmar Apr 29 '15 at 20:15
  • 1
    this method has existed since the dawn of mail clients time. It's on the Web, I am sure of it. – Funk Forty Niner Apr 29 '15 at 20:21
  • Plus, not everyone uses mail clients such as Outlook, Thunderbird etc, so you'd be best to offer them the choice of filling out a form where you can pretty much do the same thing. – Funk Forty Niner Apr 29 '15 at 20:23

1 Answers1

0

Here is an example. Please note that if you do not use a server, the client MUST have a mail client set up correctly

However do read this: Using mailto: links for email addresses…what is the practice these days?

<form action="mailto:yourmail@yourserver.com"
onsubmit="return confirm('This assumes you have a mail client. Continue?')">
  <button type="submit">yourmail@yourserver.com</button>
</form>
Community
  • 1
  • 1
mplungjan
  • 169,008
  • 28
  • 173
  • 236