General information
Category:
Coding, syntax & commands
Environment versions
Network:
Windows 2008 Server
here goes,
the error is at oitem.send
*** ========================== ***
*** PROCEDURE SendMail ***
*** ========================== ***
*** send auto mail
PROCEDURE SendMail
PARAMETERS tcTo,tcSubject,tcBody,tcAttach
o=createobject("Outlook.Application.14")
oitem=o.createitem(0)
oitem.subject=tcSubject
oitem.to=tcTo
oitem.body=tcBody
IF attachfound
IF !EMPTY(tcattach)
= ALINES(arattachments,tcattach,",")
FOR k=1 TO ALEN(arattachments,1)
tcattach="'"+arattachments(k)+"'"
oitem.Attachments.Add(&tcattach)
ENDFOR
ENDIF
ELSE
IF !FILE(&tcAttach)
MESSAGEBOX('Attachment File Not Found.',0+16,'Processing')
DO logprog WITH PROGRAM(),'Attachment File Not Found. Send Mail Aborted.','I'
RETURN
ENDIF
oitem.Attachments.Add(&tcattach)
ENDIF
** to send it
oitem.send
DO logprog WITH PROGRAM(),'Mail Sent Successfully To Recepients.','I'
** to clear up
o=.null.
RETURN
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only