|
Re: Hi. problem in sending emails [message #134227 is a reply to message #134213] |
Wed, 24 August 2005 00:31   |
 |
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
You haven't copied and pasted the code, have you? Try this:
DECLARE
mailconn UTL_SMTP.connection;
mailhost VARCHAR2 (10) := '_enter_your_mail_server_here_';
BEGIN
mailconn := UTL_SMTP.open_connection (mailhost, 25, 10); -- third parameter is timeout.
UTL_SMTP.helo (mailconn, mailhost);
UTL_SMTP.mail (mailconn, 'sender@email.address');
UTL_SMTP.rcpt (mailconn, '_enter_your_email_address_');
UTL_SMTP.DATA (mailconn, 'some thing............'); -- don't forget the connection (first parameter)
UTL_SMTP.quit (mailconn);
END; At my box, it works.
Read this first. The return codes are expected behaviour.
MHE
[Updated on: Wed, 24 August 2005 00:31] Report message to a moderator
|
|
|
|
|
|
|