Click here to Skip to main content
15,889,745 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please what protocol is used for e-mailing forms in website designing. Someone told me that the 'mailto:' protocol is not appropriate.
Posted

If you are using just HTML mailto, as far as I know, is the only answer.

However, if you use server side languages then you can take your pick. PHP, perl, .net, etc.. all do mail well. You create an html form, and submit it to your code.

Another option is to find an external form processing company. Then your html form gets posted to their site, and they relay the mail for you. This way you don't have to do the server portion.
 
Share this answer
 
v2
Comments
Espen Harlinn 26-Jan-12 16:43pm    
5'ed!
Somebody lied.

Mailto is absolutely the way to do it.

see here[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 26-Jan-12 15:07pm    
Thank you and my 5 for revealing the lie -- a deadly sin. :-)
--SA
Sergey Alexandrovich Kryukov 26-Jan-12 15:17pm    
No, no! On second though, it is not completely a lie. It's just OP did not understand things. Certainly "mailto:" is not appropriate for Web forms.
It just needs detailed clarification as we are dealing with a deep confusion.
(I won't re-vote here.)

Please see my answer, I explain everything.
--SA
Dalek Dave 26-Jan-12 15:19pm    
Yep fair enough.
Sergey Alexandrovich Kryukov 26-Jan-12 16:46pm    
Thank you, Dalek.
Actually, "mailto:" can be used even on a form, it just would not have anything to do with the functionality of the form, so it would not make much sense.
--SA
You never "e-mail" any form. The Web form is the instrument helping to send HTTP request using the method "POST" to the Web server. You always need to do some server-side programming/scripting to accept the post data, process it, convert to the data block required by e-mail standards and then do something to actually mail it.

This is another step which depends on what you host uses for mailing. Most usually, it uses SMTP protocol.

Please see:
http://en.wikipedia.org/wiki/HTTP[^],
http://en.wikipedia.org/wiki/Web_form[^],
http://en.wikipedia.org/wiki/Email[^],
http://en.wikipedia.org/wiki/Smtp[^].

Is "mailto:" schema appropriate? Yes and not. It is certainly not appropriate for Web forms (see above). But you can use it without any form (and without any server-side programming) on you page as any other anchor with "href". In this case, the local system will try to handle it. It may open a default e-mail program on the local host. (But who knows is it set up in the user's computer or not?) Anyway, the user can simply copy the e-mail address from this link and decide what to do. This is not a concern of the Web developer.

—SA
 
Share this answer
 
Comments
Espen Harlinn 26-Jan-12 16:46pm    
5'ed! I think handling it on the server is more appropriate.
Sergey Alexandrovich Kryukov 26-Jan-12 17:03pm    
I think so, too, but there are simpler cases where one just needs to document some contact information including e-mail. Not all HTMLs are parts of a Web application.

Thank you, Espen.
--SA

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900