Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email - Is there a way to make an email send itself out

Status
Not open for further replies.

estatefacts

Programmer
May 22, 2002
11
0
0
US
I have imported (copied and pasted) to an email message a fill-in text form from a web page. The reset button works perfectly (clears all text on the form) but the submit button (send out the completed form to a mailbox address) does nothing. Is there a way to get this to work?

Thanks!
 
This is a function of the email client which is functioning as a cut-down web browser. Unless you have control over which client your recipients are using you will be very unlikely to get this working reliably.

If the email client is capable of submitting the form, the most likely problem is going to be in the specification of the form's target. If the form is served by a cgi script on a web server then the default target of the form is the same script and the specification can be omitted. If you were to copy such a script into an email it would fail as you describe.

To solve this, find the opening FORM tag, which probably looks something like this:
[tt]<form method=&quot;post&quot; action=&quot;/cgi-bin/myprog&quot; enctype=&quot;application/x-www-form-urlencoded&quot;>[/tt]

To work from within an email, you would need to add the host part of the URL:
[tt]<form method=&quot;post&quot; action=&quot; enctype=&quot;application/x-www-form-urlencoded&quot;>[/tt]

Even so, some email clients will quietly ignore this (or any other HTML!).

Cheers,
 
.... To work from within an email, you would need to
.... add the host part of the URL:
.... <form method=&quot;post&quot;
.... action=&quot;.... bin/stocklist&quot;; enctype=&quot;application/x-.... urlencoded&quot;>


My code looks like this (I have changed the website and email address to be generic:

<FORM onsubmit=3D&quot;&quot; =
action=3D_vti_bin/shtml.exe/free_information.htm=20
method=3Dpost webbot-action=3D&quot;--WEBBOT-SELF--&quot;><!--webbot =
bot=3D&quot;SaveResults&quot; startspan S-Label-Fields=3D&quot;TRUE&quot;
S-Email-Address=3D&quot;mail@mydomain.com&quot; S-Email-Format=3D&quot;TEXT/PRE&quot; =
--><INPUT=20
type=3Dhidden value=3D0 name=3DVTI-GROUP><!--webbot
bot=3D&quot;SaveResults&quot; endspan i-checksum=3D&quot;43374&quot; -->=20

I don't know if the last two lines are relevant but I think I might have a general deal here. Am I on the right track?

Thanks for your help!
 
I have a very simple form that I've built (I'm no web guru) for my neighborhood association at The info in this form gets sent via sendmail to me using the methods described here by others.
email me at jeff@kloek.com (or just fill in the form) and I'll send you the html for the form and the cgi-bin that it calls. <this is not an ad for my site. I don't sell anything. It's just for my neighborhood assn.>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top