The OPEN_DATA procedure is used to send the data command to the server, indicating the start of sending email content. Subsequently, the email content can be 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 response to the command. If there are multiple responses, the last one is returned. |
Considerations
OPEN_DATA,WRITE_DATA,WRITE_RAW_DATA, andCLOSE_DATAmust be called in strict sequence.OPEN_DATAsends thedatacommand to declare the start of sending email content. After that, multiple calls toWRITE_DATAandWRITE_RAW_DATAcan be used to send the email body, and finally,CLOSE_DATAsends the terminator to end the sending.- It must be called after
RCPT. - The expected return value is a response starting with
250or251, indicating that the SMTP server has successfully responded and accepted the specified email content.
