how can I attached a file to an email in asp!
i.e.the file will be selected with the file type input:
<input type="file">
any ideas!!
Printable View
how can I attached a file to an email in asp!
i.e.the file will be selected with the file type input:
<input type="file">
any ideas!!
If you have created the CDONTS object you can use .AttachFile for sending a file within your email.
so i can do something like:
myMail.AttachFile = request("fileToAttachPath")
just like that,
btw thanx a lot!!!!!!
Code:Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'AttachFile'
/clients/baytek/corporate/sendTo.asp, line 21
your code is not working, what i am doiing wrong!!
ok, i had an error, now the syntax is good but not working:
that is the error:
and my code:Code:C:\name.txt :file that i try to upload!
error '80004005'
Unspecified error
/clients/baytek/corporate/sendTo.asp, line 16
Code:Dim myMail
Set myMail = CreateObject("CDONTS.NewMail")
Call myMail.AttachFile(request("thefile"))
myMail.From = request("FROM") 'This is the From line
myMail.To = "[email protected]" 'Put here the recipient's email address
myMail.Subject = "Request for informations"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = htmlContent
myMail.Send
Set myMail = Nothing
Can i put an attachement to an email, if the attachement come
from the client side!!
Dont use Call by AttachFile.
Code:myMail.AttachFile( Request("thefile") )
i think i haveto upload it to my server and then attach it to an
email from my server.
SO, how can i upload a file to my server!!
Take a look at this thread http://www.vbforums.com/showthread.p...threadid=76073
tx a lot kayoca, i'll llok intyo it~!!!