The Comet Programming Language and System


Latest Articles

Send emails from a website

Although today almost all pages are conversant in either language server: ASP , PHP ,JSP , … there is a wide range of pages developed in HTML . Almost always with the invaluable help of a web editor. And it is a lot of people with a basic knowledge of theInternet, launches this to tell something to cyberspace. And even where there will be sites Could we insert code HTML and that does not allow use another language

For that matter, once we have carefully worked a website, we want people to share with us your opinion on it. Or simply contact us.

Once in this situation, the easiest thing would be to put a text that is a link (or not) with our email address. Here, we are giving the caller only our management and the use to tell us what you want. If you want to take this option Leete article “email append best practices” which will help to give more power to your email links.

Of course, it may be that we want, when we write, fill out some information that the email never know if us will send or not. To do this we have the forms. And that is when we want to send us filling in the form.

At this point we have two options. Or throw some language server (for alluded, not wasted Send emails with JavaMail )

For the user to send us the form using HTML only we have to do one thing. Put “mailto: [email protected]” in the action of the form. Lagging a code HTML like this, using the tag FORM :

  1. <FORM action = “mailto: [email protected]” >

With this get the user to send us an email with the structure of the form.

After riding our form we see that if we give send the received text can be something like this:

textfield = victor & textfield2 = victor% 40miemail.com & textarea = cojonuda

The problem is that to differentiate the different parts of the message, the browser uses the identifiers of the fields. That is why it is quite convenient to modify. To this end you have to modify the name field of the form fields. We could put this way:

  1. <input type = “text” name = “name” >

Now, the chain received, would be:

name = victor & email = victor% 40miemail.com & review = cojonuda

Although still a cryptic chain, it is somewhat clearer than the last.

We also have to keep in mind a few things. The first is that this will only work if the user has an email program on your computer (Outlook, Outlook Express, Eudora …). One must be careful, because although it is rare that the computer does not have an email program, it may be the case.

The second is that although we have given him the fields (including by making compulsory how we might use JavaScript -), the user has the ability to modify the email before sending it .

Even with all this is a good solution to get in touch with us easily.