Forum Moderators: open

Message Too Old, No Replies

eMail Forms: Submitting into body

         

Psycho Mantis

1:13 pm on Dec 16, 2005 (gmt 0)

10+ Year Member



Hi.

I'd like to set up an email form that automatically places the name and mail address of the user into the correct format in order to control a mailling list system.

The idea was:


<form name="myform" action='mailto:myaddress@mydomain.com&body=subscribe <mymaillinglist>".name." <".mailaddress.">' method="post" enctype="text/plain">
Name: <input type="text" name="name" size=15><br>
Mail address: <input type="text" name="mailaddress" size=15>
<input type="submit" value="Submit">
</form>

The result what I wanted to acceive was that an email is send to the mailling list address (there's an global email address to control/edit the mailling list) with the content (body) subscribe <mymaillinglist> Username <usersemailaddress@usersdomain.com>.

Well, it didn't work. My guess is that "Name" and "Mail address" aren't variables that can be processed that way?!

What would in your opinion be the best way of doing this?

Many thanks in advance!

tedster

5:05 am on Dec 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd suggest you go with a server-side cgi script to send the form information to you. Using mailto as a form action is extremely limited and problematic -- it depends on the user's email client and SMTP server, for starters, and can throw up all kinds of errors for your end user. If it works at all -- what about the person using hotmail, for instance?

If you can't host a server side-script yourself for some reason, there are free remotely hosted solutions available that will give you moderately acceptable results.

Psycho Mantis

11:04 am on Dec 18, 2005 (gmt 0)

10+ Year Member



Hi.

Thanks for your reply.

Perhaps one this to clarify:
I don't want the information to be send to me. It has to be send to the email address of the maillinglist. The data has to be in the correct format in order to make it work.
The part I am mostly interested in (and where I'm stuck also) is how I can directly insert the data into the correct position in the body of the email.

As for using scripts, thanks for your suggestion. I was already planing on doing this, the mailto version was intended to check out the general working principle.