I’m working on my portfolio page at https://codepen.io/ddcornwall/pen/zEQELW and I’m having trouble with getting my form to work. I’ve compared my code to working examples on the web, but all my form does is open a new mail with no information in it. Is it a Codepen thing? Am I missing something?
The form action in an online form needs to be a server-side program that will read the values of the different form fields, talk and authenticate itself to an SMTP server (or alternatively, use a 3rd-party mail API) to send out the mail.
The mailto: html tag is just an href to open the user’s native email client on their computer. You cannot use it for online forms.
You can use this API service to send out mail. Free for 1st 10,000 emails. https://www.mailgun.com/
It does exactly what I’m aiming for without anything server side. Crude, but it will do for now.
Aside from a few bells and whistles and attempts to make the form accessible to screen readers it seems like my form code is just like the example from W3Schools. Except their code inserts the form fields and my does not.
I don’t know what you’re aiming for, but your code above, all it does is open up a new message window using the user’s email client with the body filled as
name=John Doe
mail=asdf@asdfsd.com
comment=test
The Subject line (for my browser) is “Form Post from Firefox Developer Edition”.