SetMessageStream Method

Sets the stream to be uploaded to the server as part of the message.

Syntax

ANSI (Cross Platform)
int SetMessageStream(IPWorksEDIStream* sMessageStream);

Unicode (Windows)
INT SetMessageStream(IPWorksEDIStream* sMessageStream);
#define MID_SMTP_SETMESSAGESTREAM 16

IPWORKSEDI_EXTERNAL int IPWORKSEDI_CALL IPWorksEDI_SMTP_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

This method sets the stream to be uploaded to the server as part of the message. If an upload stream is set before the Send method is called, the content of the stream will be read by the class and uploaded to the server; The stream should be open and normally set to position 0. The class will automatically close this stream if CloseStreamAfterTransfer is set to true (default). If the stream is closed, you will need to call this method again before calling Send again. The content of the stream will be read from the current position all the way to the end.

Note: This method and LocalFile will reset the other.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks EDI 2020 C++ Edition - Version 20.0 [Build 8203]