Oracle9i Supplied PL/SQL Packages and Types Reference Release 2 (9.2) Part Number A96612-01 |
|
UTL_SMTP
is designed for sending e-mail over Simple Mail Transfer Protocol (SMTP). It does not have the functionality to implement an SMTP server for mail clients to send e-mail using SMTP.
Many interfaces to the SMTP package appear as both a function and a procedure. The functional form returns the reply from the server for processing by the client. The procedural form discards the reply but raises an exception if the reply indicates a transient (400-range reply code) or permanent error (500-range reply code).
Note that the original SMTP protocol communicates using 7-bit ASCII. Using UTL_SMTP,
all text data (in other words, those in VARCHAR2
) will be converted to US7ASCII before it is sent over the wire to the server. Some implementations of SMTP servers that support SMTP extension 8BITMIME [RFC1652] support full 8-bit communication between client and server.
The body of the DATA
command may be transferred in full 8 bits, but the rest of the SMTP command and response should be in 7 bits. When the target SMTP server supports 8BITMIME extension, users of multibyte databases may convert their non-US7ASCII, multibyte VARCHAR2
data to RAW
and use the write_raw_data()
API to send multibyte data using 8-bit MIME encoding.
UTL_SMTP
provides for SMTP communication as specified in RFC821, but does not provide an API to format the content of the message according to RFC 822 (for example, setting the subject of an electronic mail).You must format the message appropriately.
This chapter discusses the following topics:
Table 100-1 lists the exceptions that can be raised by the API of the UTL_SMTP
package. The network error is transferred to a reply code of 421- service not available.
No limitation or range-checking is imposed by the API. However, you should be aware of the following size limitations on various elements of SMTP. Sending data that exceed these limits may result in errors returned by the server.
The following is a list of the SMTP reply codes.
|
Copyright © 2000, 2002 Oracle Corporation. All Rights Reserved. |
|