The OPEN_DATA procedure is used to send the data command to the server to indicate the start of sending email content. Subsequent email content is written using the write_data and write_raw_data procedures.
Applicability
This content applies only to OceanBase Database in Oracle mode.
Syntax
UTL_SMTP.OPEN_DATA (
c IN OUT NOCOPY connection)
RETURN reply;
UTL_SMTP.OPEN_DATA (
c IN OUT NOCOPY connection);
Parameters
| Parameter | Description |
|---|---|
| c | The SMTP connection. |
Return value
| Return value | Description |
|---|---|
| reply | The reply to the command. If multiple replies are returned, only the last one is returned. |
Considerations
OPEN_DATA,WRITE_DATA,WRITE_RAW_DATA, andCLOSE_DATAmust be called in that order.OPEN_DATAsends thedatacommand to indicate the start of sending email content. After that, you can callWRITE_DATAandWRITE_RAW_DATAmultiple times to send the email body, and finally callCLOSE_DATAto send the terminator and end the sending.- You must call
OPEN_DATAafterRCPT. - The expected return value is a reply starting with
250or251, indicating that the SMTP server has successfully responded and accepted the specified email content.