Click to See Complete Forum and Search --> : form sent to an email with file attachment


jdpjtp910
02-24-2009, 07:18 AM
I have a form on my page that you can fill out name, email address, comments, and upload any files to be added to the page. If I want the forms sent to an email and I use text/plain for the encoding the attached files are not sent as a file but rather just a path name to where the file is located on that persons PC. Is there a different encoding or can I not do this?
heres the code:

<form action="mailto:me@me.com" enctype="text/plain" method="post">
<table style="width: 100%">
<tr>
<td>Log on ID:</td>
<td><input name="userId" size="10" type="text" /></td>
</tr><tr>
<td>e-mail:</td>
<td><input name="email" size="20" style="height: 22px" type="text" /></td>
</tr><tr>
<td>Improvements:</td>
<td><textarea name="improvements" style="width: 435px; height: 183px"></textarea></td>
</tr><tr>
<td>Files to Upload</td>
<td><input name="file" type="file" /></td>
</tr><tr>
<td class="style2" colspan="2">
<input name="Submit1" type="submit" value="submit" />&nbsp;&nbsp;
<input name="Reset1" type="reset" value="reset" /></td>
</tr>
</table></form>

I dont have any javascript but I am not sure if I can use javascript for this or if HTML can handle it. Any help/guidance is apprecaited

Fang
02-24-2009, 08:07 AM
You have to use a server side script to send attachments.

Jodarecode
02-26-2009, 04:38 PM
Fangs right, you'll need to post in the php forum

The link below is how I made mine work perfectly:
http://www.webdeveloper.com/forum/showthread.php?p=344578