project BLF > class Mail > method AddToMessage
Description
Add a part to a message
Parameters
icString | input | character | String that needs to be added to the mail message |
imPart | input | memptr | Memory pointer part that needs to be added to the message. If the size = 0, then the method automatically processes the string instead. |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program1/mail.p)
assign oiReturnStatus = -98.
IF GET-SIZE(imPart) = 0
THEN DO :
IF icString = "" THEN RETURN.
ASSIGN viExtentCount = viExtentCount + 1.
set-size(vmMessage[viExtentCount]) = 0.
SET-SIZE(vmMessage[viExtentCount]) = LENGTH(icString, "RAW":U) + 1.
PUT-STRING(vmMessage[viExtentCount],1) = icString.
END.
ELSE ASSIGN viExtentCount = viExtentCount + 1
vmMessage[viExtentCount] = imPart.
assign oiReturnStatus = 0.