Click to See Complete Forum and Search --> : Email Form


neil9999
07-21-2003, 11:14 AM
Hi,

Is it possible to send an attachment by an CGI email form?

Thanks,

Neil

CyCo
07-21-2003, 11:20 AM
absolutely...with the proper cgi email script

neil9999
07-21-2003, 02:36 PM
You can see the script i am using at http://www.btopenworld.com/create/webpage/form2email

Could you show me how to put in a button which you click to select an attatchment to send?

Thanks,

Neil

Exuro
07-21-2003, 02:50 PM
You mean <input type="file"> ???

neil9999
07-22-2003, 10:32 AM
Thanks, but i can't get that to work properly. It all works fine except that when I receive the email it has nothing attached?

Here is the code for the page now:

<html>

<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Welcome to</title>
</head>

<body bgcolor="#FFFF99">
<form method="post" action="http://www.btinternet.com/cgi-bin/userform.cgi">

<input type="hidden" name="Form title" value="Source of form">

<input type="hidden" name="SendMailTo" value="my@email.com">

<input type="hidden" name="redirect" value="http://www.btinternet.com/~stevepoole/neilweb/thanks.htm">

<p align="center"><font size="4">Contact</font></p>

<p align="left">Or you can use this online form: </p>

<p align="left">Name<br>
<input name="Name" size="20" style="background-color: #FFFFDC">

<br>
<br>
E-mail address<br>
<input name="email" size="20" style="background-color: #FFFFDC">

<br>
<br>
Message<br>
<textarea name="message" rows=5 cols=50 style="background-color: #FFFFDC"></textarea>

</p>

<p align="left"><input value='fghg' type="file">

<br>
<br>
Where did you find out about this website?<br>
<br>

<p align="left">Search engine<input type="checkbox" name="foundthissite" value="searchengine" style="background-color: #FFFFDC"> </p>

<p align="left">Word of mouth<input type="checkbox" name="foundthissite" value="wordofmouth" style="background-color: #FFFFDC"> </p>

<p align="left">Other (please specify) <input type="text" name="T1" size="20" style="background-color: #FFFFDC"> </p>
<p align="left"><input type="submit" value="Submit"> <input type="Reset" value="Reset">
</form>


</body>

</html>

Thanks,

Neil

Exuro
07-23-2003, 06:54 PM
Yeah, CyCo was right. The problem isn't anywhere in your page, it's in userform.cgi. You need a different cgi script to handle file attachements... I'm sure you can find a nice free one somewhere. Maybe http://www.hotscripts.com/?