WD22
Hi, although I'm building an email variable with two attached files on it when the email arrives only the second file is there? I'm sending via the SMTP construct. The code to add the attachments is
StringToArray(gsemref:sEM_Attachment,arrAttach,";")
i is int = 1
FOR EACH sAttfile OF arrAttach
IF sAttfile = "" THEN CONTINUE
MyMessage.Attach
.Name = sAttfile
MyMessage.Attach.content = fLoadText(sAttfile)
MyMessage.Attach.ContentType = "application/pdf"
MyMessage.Attach.contentdescription = ""
MyMessage.Attach.identifiant=sAttfile
i ++
END
And the sending code is:
EmailSetTimeOut(30)
HourGlass(True)
IF NOT EmailStartSession(MySession) THEN
HourGlass(False)
Error(ErrorInfo(errMessage))
RESULT nFailed
END
IF NOT EmailSendMessage(MySession,MyMessage) THEN
HourGlass(False)
Error(ErrorInfo(errMessage),"Unable to send Email message")
RESULT nFailed
END
HourGlass(False)
EmailCloseSession(MySession)
Is there enough here for anyone to see if I'm doing anything wrong?
Many Thanks
Reg