MAIL initiates a mail transaction with the SMTP service and declares the sender's email address.
Applicability
This content applies only to the Oracle-compatible mode of OceanBase Database.
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 format "XXX=XXX (XXX=XXX ....)". |
Return value
| Return value | Description |
|---|---|
| reply | The reply to the command. If multiple replies are returned, the last reply 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 with subsequent rcpt and data commands. The connection to the SMTP server must remain open, and the helo or ehlo command must have already been executed.