HTML 5 - Trying to make a clickable link that sends an email |
HTML 5 - Trying to make a clickable link that sends an email |
bigmowebsites |
Sep 3 2020, 03:21 PM
Post
#1
|
Group: Members Posts: 8 Joined: 7-August 20 Member No.: 27,478 |
Hello community-
I am currently designing a website for my friend - we want to have a section where the user can type in a form, click a button, and the site will redirect them to their email client with form as the body of the email. (sorry if that's confusing to get across) To open an email, I thought you could simply type <a href="mailto:webmaster@example.com"> and then end it with a </a>. This doesn't seem to be working anymore... not sure why? I can upload a picture of my HTML code if needed. Thanks in advance. |
Christian J |
Sep 3 2020, 06:44 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,630 Joined: 10-August 06 Member No.: 7 |
First of all it requires the user to have an email program installed on his computer. Today many are only using GMail or similar webmail services.
|
pandy |
Sep 3 2020, 07:08 PM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
Usually the browser also needs to be configured to open said email client. At least that's how it used to be. Exception MS products that try to open OE.
But a link (<a href="mailto:...">...</a> can't be used with a form. You need to use the mailto as the value of the action attribute in the form tag. See https://htmlhelp.com/reference/html40/forms/form.html and https://htmlhelp.com/faq/html/forms.html#mailto-form . |
bigmowebsites |
Sep 6 2020, 12:41 PM
Post
#4
|
Group: Members Posts: 8 Joined: 7-August 20 Member No.: 27,478 |
Usually the browser also needs to be configured to open said email client. At least that's how it used to be. Exception MS products that try to open OE. But a link (<a href="mailto:...">...</a> can't be used with a form. You need to use the mailto as the value of the action attribute in the form tag. See https://htmlhelp.com/reference/html40/forms/form.html and https://htmlhelp.com/faq/html/forms.html#mailto-form . Gotcha. Thank you for the links, I will go over them and hopefully i'll be able to get it to work. It seems that having a link open to a web browser isn't working, which is confusing me... I've used this many times in the past, but now it seems to be broken. Here is an example of what i'm talking about - <a href="mailto:exampleemail@gmail.com">Click here to email us!</a> Is there any reason this shouldn't work? Thank you in advance. |
pandy |
Sep 6 2020, 12:45 PM
Post
#5
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
That should work. I thought you tried to used the link with the form.
As said, you may need to configure your browser to open the email client of your choice. To be honest I'm not up today how this works nowadays with the dumbed down browsers we have. |
bigmowebsites |
Sep 6 2020, 01:06 PM
Post
#6
|
Group: Members Posts: 8 Joined: 7-August 20 Member No.: 27,478 |
That should work. I thought you tried to used the link with the form. As said, you may need to configure your browser to open the email client of your choice. To be honest I'm not up today how this works nowadays with the dumbed down browsers we have. You were 1000% right, the issue was my PC. I've been using that line of code to get to an email for a very long time so I was super confused why it wasn't working. Thank you for your help so far, I will try to get the form going soon. Happy labor day! |
pandy |
Sep 6 2020, 01:14 PM
Post
#7
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
Ah, good. Happy labor day to you too! I don't really celebrate that (I'm in Scandinavia), but I can make an exception for you.
|
bigmowebsites |
Sep 8 2020, 05:06 PM
Post
#8
|
Group: Members Posts: 8 Joined: 7-August 20 Member No.: 27,478 |
|
pandy |
Sep 8 2020, 06:25 PM
Post
#9
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
It's a wide, wide web!
|
Lo-Fi Version | Time is now: 29th March 2024 - 05:49 PM |