The MAIL command is used to initiate a mail transaction with the SMTP service and declare the sender's email address.
Applicability
This topic applies only to OceanBase Database in Oracle mode.
Syntax
UTL_SMTP.MAIL (
c IN OUT NOCOPY connection,
sender IN VARCHAR2,
parameters IN VARCHAR2 DEFAULT NULL)
RETURN reply;
UTL_SMTP.MAIL (
c IN OUT NOCOPY connection,
sender IN VARCHAR2,
parameters IN VARCHAR2 DEFAULT NULL);
Parameters
| Parameter | Description |
|---|---|
| c | The SMTP connection. |
| sender | The sender's email address. |
| parameters | The format of the SMTP protocol, as defined in RFC1869. It must follow the "XXX=XXX (XXX=XXX ....)" format. |
Return value
| Return value | Description |
|---|---|
| reply | The reply to the command. If there are multiple replies, the last one is returned. |
Considerations
The mail command is used to inform the server that a new mail transaction has been initiated. This transaction must be completed by subsequent calls to the rcpt and data commands. The connection to the SMTP server must be open, and the helo or ehlo command must have been executed.