OPEN_DATA is used to send the data command, informing the server that the email content is about to be sent. The email content is subsequently written using write_data and write_raw_data.
Applicability
This content applies only to the Oracle-compatible mode of OceanBase Database.
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 values
| Return value | Description |
|---|---|
| reply | The reply to the command. If multiple replies are received, the last reply is returned. |
Considerations
OPEN_DATA,WRITE_DATA,WRITE_RAW_DATA, andCLOSE_DATAmust be called in strict sequence.OPEN_DATAsends thedatacommand to indicate the start of email content transmission. Multiple calls toWRITE_DATAandWRITE_RAW_DATAcan then be made to send the email body, and finally,CLOSE_DATAsends the terminator to end the transmission.- Must be called after
RCPT. - The expected response is a message starting with
250or251, indicating that the SMTP server has successfully responded and accepted the specified email content.