Reputation: 23
I have a HTML form with a submit button that emails the input from the form fields to a specific email when clicked. But right now, when the submit button is clicked, it just pops up a little window saying the website is trying to send email from my Outlook and asking if I will allow it. How can I make it so that Outlook opens up and I can review the email, with all the input, before it's sent? I'm just using the most straightforward method of submitting this form, form action=mailto...
, method=POST
, and an <input type="submit" />
button.
Upvotes: 0
Views: 1626
Reputation: 51
The proper way to handle this is to use an HTML form and a server based form processor. This requires a little bit of coding knowledge. Based on your question, it doesn't sound like you have a lot of experience with server-side coding-- May I suggest one of the many server side plugins that will process the form and email you the results? http://www.tectite.com/ has PHP FormMail which is easy to use and configure.
As has been stated above, you can't force a browser to open an email client-- Furthermore many users use gmail, hotmail, yahoo mail and may use the browser as their client. Your solution would exclude a large segment of users from responding!
Good luck.
Upvotes: 0
Reputation: 944054
You can't.
There is no way to override the conformation dialog, and the system depends on the user having a compatible email client installed and configured (which makes the approach hideously unreliable).
If you want to deal with forms, submit them over http(s), not email.
Upvotes: 1
Reputation: 4039
You can't force a browser to run an external program, that would be a huge security hole. Mail clients are one of the allowed external programs, but that still required a users input.
Upvotes: 0