Gardy
06-08-2009, 04:26 PM
Hi all,
I have set up several forms on our companies intranet and an eamil routine using CDOSYS but now that I am testing it I have found that it will not work with attachments.
I have verified that the path is correct and that the variable is holding the correct data but I am being told that the specified path cannot be found. I suspect that this is trying to attach to the email from the server, rather than the client machine, so does anybody know how I would be able to correct this?
My code is as follows.
' Email Message Creation
Set myMail=CreateObject("CDO.Message")
myMail.Subject = MsgSubject & " (" & ClientName & ")"
myMail.From = MsgFrom
myMail.To = MsgTo
myMail.HTMLBody = MsgBodyFull
IF str_pic1 <> "" THEN
myMail.AddAttachment str_pic1
END IF
IF str_pic2 <> "" THEN
myMail.AddAttachment str_pic2
END IF
IF str_pic3 <> "" THEN
myMail.AddAttachment str_pic3
END IF
IF str_pic4 <> "" THEN
myMail.AddAttachment str_pic4
END IF
IF str_pic5 <> "" THEN
myMail.AddAttachment str_pic5
END IF
myMail.Send
set myMail=nothing
Any help is greatly appriciated.
Thanks.
I have set up several forms on our companies intranet and an eamil routine using CDOSYS but now that I am testing it I have found that it will not work with attachments.
I have verified that the path is correct and that the variable is holding the correct data but I am being told that the specified path cannot be found. I suspect that this is trying to attach to the email from the server, rather than the client machine, so does anybody know how I would be able to correct this?
My code is as follows.
' Email Message Creation
Set myMail=CreateObject("CDO.Message")
myMail.Subject = MsgSubject & " (" & ClientName & ")"
myMail.From = MsgFrom
myMail.To = MsgTo
myMail.HTMLBody = MsgBodyFull
IF str_pic1 <> "" THEN
myMail.AddAttachment str_pic1
END IF
IF str_pic2 <> "" THEN
myMail.AddAttachment str_pic2
END IF
IF str_pic3 <> "" THEN
myMail.AddAttachment str_pic3
END IF
IF str_pic4 <> "" THEN
myMail.AddAttachment str_pic4
END IF
IF str_pic5 <> "" THEN
myMail.AddAttachment str_pic5
END IF
myMail.Send
set myMail=nothing
Any help is greatly appriciated.
Thanks.