EXAMPLES
- Retrieve the home page from http://www.acme.com/
*
- DECLARE
- c utl_smtp.connection;
*
- PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
- BEGIN
- utl_smtp.write_data(c, name || ': ' || header ||
utl_tcp.CRLF);
- END;
*
- BEGIN
- c := utl_smtp.open_connection('smtp-server.acme.com');
- utl_smtp.helo(c, 'foo.com');
- utl_smtp.mail(c, 'sender_at_foo.com');
- utl_smtp.rcpt(c, 'recipient_at_foo.com');
- utl_smtp.open_data(c);
- send_header('From', '"Sender" <sender_at_foo.com>');
- send_header('To', '"Recipient" <recipient_at_foo.com>');
- send_header('Subject', 'Hello');
- utl_smtp.write_data(c, utl_tcp.CRLF || 'Hello, world!');
- utl_smtp.close_data(c);
- utl_smtp.quit(c);
- EXCEPTION
- WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
- utl_smtp.quit(c);
- raise_application_error(-20000,
- 'Failed to send mail due to the following error: ' ||
sqlerrm);
- END;
In article <974636805.285003_at_ipt2.iptelecom.net.ua>,
"Wit Serdakovskij" <wit_at_iptelecom.net.ua> wrote:
> Hello.
> I have to send a 8-bit message (Cyrillic) using UTL_SMTP. Anybody
knows the
> way?
>
> With best regards,
> Wit.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Nov 20 2000 - 09:02:07 CST