1

I have finished my site but my issue is when I tried to submit a contact to see if it works, I keep getting the error " Cannot GET /[email protected] ". I was hoping some can help me with what I'm doing wrong.

I have tried changing the input into a button but it still gave me an error.

<form class="form-wrap" action="[email protected]" method="Get" enctype="text/plain">
 <input type="text" placeholder="Name">
 <input type="email" placeholder="Email">
 <textarea placeholder="Message" name="Message"></textarea>
 <input type="submit" name="submit" value="Send"> 
</form>

The error message below is what I keep on getting.

Cannot GET /[email protected]

Nick Parsons
51.7k6 gold badges62 silver badges80 bronze badges
asked Jul 28, 2019 at 1:12
4
  • 1
    action="[email protected]" is not valid, what do you expect this to do? Commented Jul 28, 2019 at 1:14
  • You need to pass a path in your action. You have passed an email. Commented Jul 28, 2019 at 1:15
  • Action attribute in forms are meant to pass the data to a particular method on back-end on form submit event. It's your job that in that method you write the logic to send the form data to your email address. Commented Jul 28, 2019 at 1:16
  • What I'm trying to accomplish is to make it so that when the submit button is pushed, I would like that information to be sent to my email. which is why I put my email address in the action perimeter. Any idea of how to go about that using HTML? Commented Jul 28, 2019 at 1:29

2 Answers 2

1

You need to change your action to mailto:

<form class="form-wrap" action="mailto:[email protected]" method="Get" 
enctype="text/plain">
answered Jul 28, 2019 at 1:21
Sign up to request clarification or add additional context in comments.

Comments

1

Method should be post. Will receive these details. Method='post' and action="mailto:[email protected] it will work.

1 Comment

Thank you it works perfectly now. I really appreciate your help.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.