OPEN_DATA

2026-03-06 07:02:42  Updated

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, and CLOSE_DATA must be called in strict sequence. OPEN_DATA sends the data command to indicate the start of email content transmission. Multiple calls to WRITE_DATA and WRITE_RAW_DATA can then be made to send the email body, and finally, CLOSE_DATA sends the terminator to end the transmission.
  • Must be called after RCPT.
  • The expected response is a message starting with 250 or 251, indicating that the SMTP server has successfully responded and accepted the specified email content.

Contact Us