Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8345477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:41:04+00:00 2026-06-09T06:41:04+00:00

I built an HTML form and whenever I submit it I’m asked to open

  • 0

I built an HTML form and whenever I submit it I’m asked to open up G Mail or Outlook. When I do, a new email is opened with the correct email address. The problem is I want it to send without opening anything. I would like to only use HTML for the form, no PHP/MySQL.

        <form method="post" action="mailto:contact@walkerloden.com" enctype="text/plain">
            <p>Name: <input type="text" name="Name" size="20"></p>
            <p>Email: <input type="text" name="Email" size="20"></p>
            <p><input type="submit" value="Submit" name="Submit"></p>
        </form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:41:08+00:00Added an answer on June 9, 2026 at 6:41 am

    You shouldn’t have your form action set to mailto anything.

    You should instead have that direct to a script you’ve written where you can accept the POST variables and then send an email. There is a native PHP function called mail() which will do just that. Your code should look like this:

    HTML

    <form method="post" action="scripts/mailtome.php" enctype="text/plain">
        <p>Name: <input type="text" name="Name" size="20"></p>
        <p>Email: <input type="text" name="Email" size="20"></p>
        <p><input type="submit" value="Submit" name="Submit"></p>
    </form>
    

    PHP – mailtome.php

    <?php
        $name = stripslashes(trim($_POST['Name']));
        $email = stripslashes(trim($_POST['Email']));
        $to = 'email@address.com'; 
        $subject = 'CONTACT FORM';
    
        $body = "From: $name\n E-Mail: $email";
    
        if(mail($to, $subject, $body, $name.' - '.$email))
            echo("It worked");
        else
            echo("Something went wrong");
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’ve built an HTML form for an email signup. When you click in the
I've built an HTML form that sends an email via PHP, but it's giving
I'm trying to have the action of a HTML form built when the user
Consider an HTML form built in the following way: <select name=schoolType> @foreach (SchoolType schoolType
I have an html form which inserts data into a database. I just built
How to check if a browser has built-in HTML form validation ability? By doing
I've built a website with a HTML form/ PHP upload for image files, it
I have a simple html form. The built-in HTML helpers are rendering. The markup
I have a form built with formtastic, the code is <%= semantic_form_for @plan, :html
So I have my form built in html and validated in JS and it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.