• Index
  •  » ASP
  •  » File attachment with asp

#1 2006-08-13 05:41:43

mahesha
New member
Ranking
Registered: 2006-08-13
Posts: 1
Expertise

File attachment with asp

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 :

Code::

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

 

#2 2006-08-18 23:05:41

Tabs
Banned
RankingRanking
Registered: 2006-08-18
Posts: 27
Website  Expertise

Re: File attachment with asp

How is your form being set up. I don't see where it says: <form action...>

That is what I am looking for, and almost definitely the problem. Post that line and I will set you straight.

Offline

 

#3 2007-11-17 01:54:55

shakir
New member
Ranking
Registered: 2007-11-10
Posts: 8
Expertise

Re: File attachment with asp

I dont find problemin the script, Tey HTNL format

Offline

 

#4 2008-05-15 02:45:07

alemcherry
Member
RankingRanking
Registered: 2008-01-19
Posts: 33
Expertise

Re: File attachment with asp

Obviously you need to upload the file and save it first. Use any upload component to do that and then use the saved file path to attach to the email.

Offline

 
  • Index
  •  » ASP
  •  » File attachment with asp

Board footer

OPML feedsRSS feeds



Powered by WWWThreads Forum
© Copyright 2006, WWWThreads