Hi! I have a script that sends out email using CDONTS and uploads a file for an attachement, in this case a WORD file. My file is uploaded correctly to the server and the email is sent ok and I receive it. It looks as if the WORD file is on the email message, it has a size, etc. When I download it and open it, the attachment is empty.
I downloaded my uploaded file directly using an FTP program and was able to open it ok in WORD...just can't get it when it's an attachment. By the way, I can upload up to 3 files and it appears to work, except when I try to download them from the email message.
Any ideas?
Here's my code:
dim objMail
set objMail = Server.CreateObject("CDONTS.Newmail"
objMail.From = "myaddress@myaddr.org"
objMail.To = "myemail@mydomain.com"
objMail.Subject = strSubject
if blnFile1 = TRUE then
objMail.AttachFile Server.MapPath("/emailattach/" & SavedFilename1)
end if
if blnFile2 = TRUE then
objMail.AttachFile Server.MapPath("/emailattach/" & SavedFilename2)
end if
if blnFile3 = TRUE then
objMail.AttachFile Server.MapPath("/emailattach/" & SavedFilename3)
end if
objMail.MailFormat = 0
objMail.BodyFormat = 0
objMail.Body = strMessage
objMail.Send
set objMail = nothing
THANKS!
I downloaded my uploaded file directly using an FTP program and was able to open it ok in WORD...just can't get it when it's an attachment. By the way, I can upload up to 3 files and it appears to work, except when I try to download them from the email message.
Any ideas?
Here's my code:
dim objMail
set objMail = Server.CreateObject("CDONTS.Newmail"
objMail.From = "myaddress@myaddr.org"
objMail.To = "myemail@mydomain.com"
objMail.Subject = strSubject
if blnFile1 = TRUE then
objMail.AttachFile Server.MapPath("/emailattach/" & SavedFilename1)
end if
if blnFile2 = TRUE then
objMail.AttachFile Server.MapPath("/emailattach/" & SavedFilename2)
end if
if blnFile3 = TRUE then
objMail.AttachFile Server.MapPath("/emailattach/" & SavedFilename3)
end if
objMail.MailFormat = 0
objMail.BodyFormat = 0
objMail.Body = strMessage
objMail.Send
set objMail = nothing
THANKS!