Home » SQL & PL/SQL » SQL & PL/SQL » email program (9i)
email program [message #323868] Thu, 29 May 2008 22:03 Go to next message
art_ora
Messages: 10
Registered: May 2008
Junior Member
Hi everyone,

I'm just want you to know that I thank you for helping me coding my email program. And I have some question about;
1. my email program using UTL_SMTP was succeessful on our local email.
2. how can i send email outside using oracle program example sending email on yahoo account.

thanks, i hope you can give me feedback re this matter.

thank you
Re: email program [message #323870 is a reply to message #323868] Thu, 29 May 2008 22:11 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
> how can i send email outside using oracle program example sending email on yahoo account.
You can't because Yahoo's email server are configured to not relay external messages.
Re: email program [message #323890 is a reply to message #323868] Thu, 29 May 2008 23:38 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
You can use your local server for that, if you don't mind that people can see the actual sender-address.
In the SMTP-protocol you use "MAIL FROM" to indicate to the smtp-server your sender address. You can however, in the data-section add a "From: " tag, to fill the sender that is displayed in the message. 90% of all people will only check that last one.

By the way: this has NOTHING to do with Oracle.

[Updated on: Thu, 29 May 2008 23:43]

Report message to a moderator

Re: email program [message #323909 is a reply to message #323890] Fri, 30 May 2008 00:40 Go to previous messageGo to next message
art_ora
Messages: 10
Registered: May 2008
Junior Member
Hi Frank,
this is my coding:
PROCEDURE Send_Mail (p_sender IN VARCHAR2,
p_recipient IN VARCHAR2,
p_message IN VARCHAR2)
AS
l_mailhost VARCHAR2(255) := 'NPIADC01';
l_mail_conn utl_smtp.connection;
BEGIN
l_mail_conn := utl_smtp.open_connection(l_mailhost, 25);
utl_smtp.helo(l_mail_conn, l_mailhost);
utl_smtp.mail(l_mail_conn, p_sender);
utl_smtp.rcpt(l_mail_conn, p_recipient);
utl_smtp.open_data(l_mail_conn );

utl_smtp.write_data(l_mail_conn, p_message);
utl_smtp.close_data(l_mail_conn );
utl_smtp.quit(l_mail_conn);
END;

-------------
may l_mailhost is our local server, but when I send to my yahoo email as recipient nothing was send.
Re: email program [message #324044 is a reply to message #323909] Fri, 30 May 2008 06:29 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
So the mailserver apparently blocks mails going outside. Ask your systems administrator about it.
Previous Topic: while insert data into the table by using fuction
Next Topic: Best way of long to long column insertion in sql
Goto Forum:
  


Current Time: Tue Nov 05 14:05:53 CST 2024