I asumme you've tested sending email from the command line or equivalent tool on the box using the same settings (ie localhost,25) as your mailserver.
Cheers Connor --- Janet Linsy <[EMAIL PROTECTED]> wrote: > Hi, I have the following code. it compiles fine and > runs successfully. But when I checked email in > [EMAIL PROTECTED], I didn't get any mail. I'm testing on > the same machine (win2000, 817). Anybody knows why? > > Thank you in advance. > > > create or replace PROCEDURE send_test_message > IS > mailhost VARCHAR2(64) := 'localhost'; > sender VARCHAR2(64) := '[EMAIL PROTECTED]'; > recipient VARCHAR2(64) := '[EMAIL PROTECTED]'; > mail_conn utl_smtp.connection; > BEGIN > mail_conn := utl_smtp.open_connection(mailhost, > 25); > utl_smtp.helo(mail_conn, mailhost); > utl_smtp.mail(mail_conn, sender); > utl_smtp.rcpt(mail_conn, recipient); > -- If we had the message in a single string, we > could > collapse > -- open_data(), write_data(), and close_data() into > a > single call to data(). > utl_smtp.open_data(mail_conn); > utl_smtp.write_data(mail_conn, 'This is a test > message.' || chr(13)); > utl_smtp.write_data(mail_conn, 'This is line 2.' > || chr(13)); > utl_smtp.close_data(mail_conn); > utl_smtp.quit(mail_conn); > EXCEPTION > WHEN OTHERS THEN > -- Insert error-handling code here > NULL; > END; > / > > __________________________________________________ > Do you Yahoo!? > Yahoo! Shopping - Send Flowers for Valentine's Day > http://shopping.yahoo.com > -- > Please see the official ORACLE-L FAQ: > http://www.orafaq.net > -- > Author: Janet Linsy > INET: [EMAIL PROTECTED] > > Fat City Network Services -- 858-538-5051 > http://www.fatcity.com > San Diego, California -- Mailing list and web > hosting services > --------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an > E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of > 'ListGuru') and in > the message BODY, include a line containing: UNSUB > ORACLE-L > (or the name of mailing list you want to be removed > from). You may > also send the HELP command for other information > (like subscribing). > ===== Connor McDonald web: http://www.oracledba.co.uk web: http://www.oaktable.net email: [EMAIL PROTECTED] "GIVE a man a fish and he will eat for a day. But TEACH him how to fish, and...he will sit in a boat and drink beer all day" __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: =?iso-8859-1?q?Connor=20McDonald?= INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
