Hi all,
I need to send a file attachment with my email to the selected users here mail sending works properly
but i can't send the attached file with that can anyone help me on this
here is my coding
//-----------------------------
Dim obj
subject = Request.Form("subject")
body = Request.Form("body")
if subject <> "" then
str3=split(session("data"),",")
response.write(session("data"))
for i =0 to ubound(str3)
set obj = server.CreateObject("Cdonts.Newmail")
obj.To = str3(i)
obj.From ="mahesha@webcaresys.net"
obj.Subject = subject
obj.Body = body
'FreeTools = Request.Form("T2")
'obj.AttachFile(FreeTools)
obj.Send
Next
end if
//-----------------
this is the field to fasilitate the file attachment
//-----------------------
<td width="115" bgcolor="#fffdf0"><font class="smalltxt"> </font><font class="smalltxt">Attach File</font></td>
<td width="495" bgcolor="#fffdf0"> <input type="file" name="T2" size="23" class="design"></td>
//---------------------------------
Need ur help
Offline
With ASP you need to have an upload component installed on your server to do this. Find out which one your hosting company has installed and then Google it/visit the official site - there are bound to be code snips and a manual for it. Do some test uploads, and if you're still struggling to combine that with your mail script, come back and I'm sure we can help... 
Offline
You're talking about uploading a file that is, then, subsequently attached to a server-side mail? Such a file would have to be stored on your server, first, before it can be attached to a server-side mail. Thus, checking the file extension is pretty straightforward:
Dim ext, pos, str
ext = LCase(Request.Form("AttachFileName"))
pos = InStrRev(1, ext, ".", vbTextCompare)
If pos > 0 Then ext = Mid(ext, pos + 1)
If ext <> "doc" And ext <> "txt" And ext <> "xls" Then
Response.Write "<p>Invalid file extension.</p>" & vbCrLf
Response.End
End IfOffline