I have a MYSQL database of members, I want to be able to send members emails with attachments.
Using the following ASP code I can send emails without attachments but get error 800421a when I try an attachment.
I believe the problem is the attachment is on localhost and the server tries to find it on the server.
Data is selected/entered on the previous page and set into variables using "Request.form"
vAttachment contains the address of the file on the local computer; "C:\myfile\xxx.txt".
CODE:
Set oMSG = createobject("CDO.Message")
oMSG.To = veMailAddress
oMSG.From = vSender
oMSG.Subject = vSubject
oMSG.TextBody = veMailMessage
if vAttachment <> "" then
Att = " & vAttachment
oMSG.AddAttachment(Att)
end if
oMSG.Send()
set oMSG=nothing
I have tried several various ideas of " without success. What is the correct syntax to add an attachment using a file on the local computer?
Thanks for any help
smokeyjoe
Using the following ASP code I can send emails without attachments but get error 800421a when I try an attachment.
I believe the problem is the attachment is on localhost and the server tries to find it on the server.
Data is selected/entered on the previous page and set into variables using "Request.form"
vAttachment contains the address of the file on the local computer; "C:\myfile\xxx.txt".
CODE:
Set oMSG = createobject("CDO.Message")
oMSG.To = veMailAddress
oMSG.From = vSender
oMSG.Subject = vSubject
oMSG.TextBody = veMailMessage
if vAttachment <> "" then
Att = " & vAttachment
oMSG.AddAttachment(Att)
end if
oMSG.Send()
set oMSG=nothing
I have tried several various ideas of " without success. What is the correct syntax to add an attachment using a file on the local computer?
Thanks for any help
smokeyjoe