Click here to Skip to main content
13,259,986 members (52,230 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I have created html web site,

there is contact us page and I need to mail contact detail.

How can I implement this in HTML.

Posted 14-Jan-13 20:05pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You will need some server-side technology: ASP.NET, JSP, PHP, Python — you name it.
You can have an HTML form to get some mail data from your user. The form can have "POST" method to perform HTTP post to your HTTP server with some target URL. Everything else depends on what you have on the server side.

Please be advised that sending e-mail from the post data is a really dangerous business. You should get to it only if you have sufficient security experience, otherwise someone will turn your host into a zombie distributing spam or something like that. It can be done easily, in no time, unless you fully control the post data. For further detail, please see my past answer:
unable to send mail , it showing the error in below code .[^].

You can get more help if you decide on a particular server-side technology.

ExpertITM 15-Jan-13 1:36am

But I have created website totally in html there is no other way to implement this?

Zafar Sultan 15-Jan-13 1:51am
***** for explaining the security flaw.
Zafar Sultan 15-Jan-13 1:52am
The possible way to achieve the functionality has been explained by SA. Now which "other" way you are looking at?
Actually, there is simply no such way, by the reason I explained below, please see.
No. Think by yourself: you don't know what is installed on your user's computer. You can only do it on the server side, where you have everything.

Of course, you can simply write the anchor with href UTL like mailto:someAccount@someDomain.someTLD, but it is not sending e-mail, not in any sense of this word. Typically, it loads some default mail application, but you never can guarantee that such application exists. This is pretty much like saying: "send your e-mail the way you prefer, if you can". :-)

Well, this can be an acceptable option, only don't think it will actuall send anything...

Thank you, Zafar. My explanation is from real-life experience, by the way...
ExpertITM 15-Jan-13 3:01am

I am looking for any 3rd party service which is provide this kind of solutions.
I can be action to that service, and that can bounce me a mail.
I will compromise with security concern.

Can you finally understand that it is not related to 3rd-party of 1st (2nd) party?!
Who will provide this kind of service for you, why? The service is HTTP service, that's quite enough. If you have a Web site, you have the service already. All HTTP service providers support PHP, as a bare minimum...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171114.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100