DATA specifies the email body.
Applicability
This topic applies only to OceanBase Database in Oracle mode.
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 message to be sent, including headers, in the [RFC822] format. |
Return value
| Return value | Description |
|---|---|
| reply | The response to the command. If there are multiple responses, the last one is returned. |
Considerations
The content of the body parameter must comply with the
MIME (RFC822)specification. Use<CR><LF>.<CR><LF>as the message terminator. The<CR><LF>.<CR><LF>in the text content will be translated into<CR><LF>..<CR><LF>. You must callRCPTbefore this.The expected return value is a response starting with
250. The initial return code354of thedatacommand will not be returned.354indicates that the client has sent theDATAcommand to the SMTP server and is starting to transmit the email body. If the server is ready to receive data, it will return the354status code.250indicates that the request was successfully received and processed.