DATA is used to specify the email body.
Applicability
This content applies only to the Oracle-compatible mode of OceanBase Database.
Syntax
UTL_SMTP.DATA (
c IN OUT NOCOPY connection
body IN VARCHAR2 CHARACTER SET ANY_CS)
RETURN reply;
UTL_SMTP.DATA (
c IN OUT NOCOPY connection
body IN VARCHAR2 CHARACTER SET ANY_CS);
Parameters
| Parameter | Description |
|---|---|
| c | The SMTP connection. |
| body | The text information to be sent, which includes headers and is in the [RFC822] format. |
Return value
| Return value | Description |
|---|---|
| reply | The reply to the command. If multiple replies are received, the last reply is returned. |
Considerations
The application must ensure that the content of the
bodyparameter complies with theMIME (RFC822)standard. Use<CR><LF>.<CR><LF>as the message terminator. Any<CR><LF>.<CR><LF>in the text content will be escaped as<CR><LF>..<CR><LF>. This must be called afterRCPT.The expected response is a message starting with
250. The initial return code354from theDATAcommand will not be returned.354indicates that the client has sent theDATAcommand to the SMTP server and has started transmitting the email body. If the server is ready to receive data, it will return the354status code.250indicates that the request has been successfully received and processed.