How to add another email to desktop?

How do I add a text box on my website to send me visitors email addresses?

  • I want to add a "Sign up for our newsletter" area on my site. For right now, all I want is a text box for them to enter their email address. I know how to do forms in HTML, but if I use the post method to send it to me, they have to have a desktop email client to send it. How can I have their address sent to me without using the desktop email? Is there a way to do it with just HTML and Javascript or do I have to use PHP or some other language?

  • Answer:

    You can't do it with just HTML and Javascript, because those only work on the user's computer, and you can't get to the sendmail function directly. The post method doesn't require an email client though - it sends the information to your server via HTTP, but not anywhere else. There are a couple of ways to do this: - The standard way would be with a cgi program, usually written in a scripting language such as PHP or Perl. Once you know the steps to installing such a program, this particular task would be very easy to accomplish. The form has "action=/cgi-bin/name-of-program" as part of its definition. Then it activates that program on the server, which can do whatever you like, such as record the input in a file on the server, or generate an email to whatever address you want (such as your own email). That script or program has to be written by someone, and can be in any language available on the server. You can probably find one already written with a web search. - Another way, not very good, but which would involve less work, would be to use the Get method. Then the email address would show up in your server access logs. If you put "action=getemailaddress.html method=get" in the form, then, in your server accesslogs, there would be lines of the form getemailaddress.html? [email protected] or whatever their email address is. (Assuming address is the name of the textbox in your form. Also, I'm not sure if "action=whatever.html" will work and just return the contents of whatever.html or not.) Then you would have to read the logs and look for lines like that. Most hosting packages include the ability to do that, but then you'd have the task of wading through them all the time. As I said, not a very good method, but requires less work, at least up front.

byrn at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.