Home » SQL & PL/SQL » SQL & PL/SQL » UTL_MAIL (merged)
UTL_MAIL (merged) [message #405380] Wed, 27 May 2009 08:35 Go to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

How i can send emails using UTL_MAIL.send . I dont have one in my current database oracle 10g.Please let me know how i can implement this and how i can send emails using this.
Re: UTL_MAIL (merged) [message #405387 is a reply to message #405380] Wed, 27 May 2009 08:46 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You don't have what? UTL_MAIL? Maybe it should help if you posted your Oracle version (up to 4 decimals).

Regards
Michel
Re: UTL_MAIL (merged) [message #405392 is a reply to message #405387] Wed, 27 May 2009 09:17 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

Michel neither i want your advice nor suggestion because you are very arrogant fellow.Please dont interfere . I m just learning and if i admit i dont know something i really mean i dont know .
Re: UTL_MAIL (merged) [message #405406 is a reply to message #405392] Wed, 27 May 2009 10:09 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you want an appropriate answer you should at least post your version.
The most arrogant and narcissic person here is you thinking that you can say what you want and we can't do the same thing.

Read OraFAQ Forum Guide and post accordingly.

Regards
Michel

[Updated on: Wed, 27 May 2009 10:18]

Report message to a moderator

Re: UTL_MAIL (merged) [message #405408 is a reply to message #405392] Wed, 27 May 2009 10:12 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
arif_md2009 wrote on Wed, 27 May 2009 16:17
Michel neither i want your advice nor suggestion because you are very arrogant fellow.Please dont interfere . I m just learning and if i admit i dont know something i really mean i dont know .

I totally agree with you.
Let me help you then:

You don't have what? UTL_MAIL? Maybe it should help if you posted your Oracle version (up to 4 decimals).
Re: UTL_MAIL (merged) [message #410312 is a reply to message #405380] Fri, 26 June 2009 02:14 Go to previous messageGo to next message
nitinkumarbe
Messages: 8
Registered: June 2009
Junior Member

Hi

You can send Email from UTL_MAIL Package like below.

BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET smtp_out_server = 127.0.0.1′;
UTL_MAIL.send(
sender => 'me@address.com'
,recipients => 'you@address.com'
,cc => person1@address.com','person2@address.com' 
,bcc => 'person3@address.com','person4@address.com'
,subject => 'Test Mail'
,message => 'Hello World'
,mime_type => 'text; charset=us-ascii'
,priority => 3);
END; 


I got the code from the article http://technotes.towardsjob.com/oracle/utl-mail-package-oracle-10g/

Regards
Nitin

[Updated on: Fri, 26 June 2009 02:16]

Report message to a moderator

Re: UTL_MAIL (merged) [message #416869 is a reply to message #405380] Tue, 04 August 2009 19:58 Go to previous messageGo to next message
dayang_aziz@yahoo.com
Messages: 19
Registered: August 2009
Junior Member
Hi nitinkumarbe,

I tried the code you gave..
somehow there is error when I compiled the form.

Here is the error - this feature is not supported in client-side programs

do you have any idea to resolve this..

Thanks,
Dayang
Re: UTL_MAIL (merged) [message #416870 is a reply to message #405380] Tue, 04 August 2009 20:06 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
>Here is the error - this feature is not supported in client-side programs
>do you have any idea to resolve this..

EXACTLY what did You do to generate an error?

Post Operating System (OS) name & version for DB server system.
Post results of SELECT * from v$version.
Post Operating System (OS) name & version for client system.
Post Oracle version to 4 decimal place of client s/w.

You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Go to the URL above click the link "Posting Guidelines"
Go to the section labeled "Practice" & do as directed.
Re: UTL_MAIL (merged) [message #416872 is a reply to message #405380] Tue, 04 August 2009 20:24 Go to previous messageGo to next message
dayang_aziz@yahoo.com
Messages: 19
Registered: August 2009
Junior Member
Actually I tried the code nitinkumarbe gave on my form.
I created a procedure with the code.

Quote:
PROCEDURE test_email2 IS
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET smtp_out_server = 10.0.3.79';
UTL_MAIL.send(sender => 'dayang_aziz@yahoo.com',
recipients => 'dayang_aziz@yahoo.com'',
subject => 'Testing .. ',
message => 'Test Message!');

END;


when I compiled the procedure in my forms developer it gave error -
this feature is not supported in client-side programs.

When I google the thread about the above error, experts say that EXECUTE IMMEDIATE can not be used in any version of Oracle Forms.

When I remove "EXECUTE IMMEDIATE 'ALTER SESSION SET smtp_out_server = 10.0.3.79';" , I could compile the form without error. But when I run the form, I got error ora-12703.

For your info, I could sent and recieved email using the same procedure in TOAD.

My local OS is Microsoft Windowa Xp Professional Version 2002 service Pack 3.

Result of SELECT * from v$version.
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for HPUX: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

I ran the form at my local.

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Re: UTL_MAIL (merged) [message #416874 is a reply to message #405380] Tue, 04 August 2009 20:58 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
>http://www.orafaq.com/forum/m/416868/136107/#msg_416868

Do NOT cross/multi-post!

FORMS is/was correct place to post this issue.
Re: UTL_MAIL (merged) [message #416875 is a reply to message #405380] Tue, 04 August 2009 21:03 Go to previous message
dayang_aziz@yahoo.com
Messages: 19
Registered: August 2009
Junior Member
I'm sorry and thank you..
Wink

Regards,
Dayang
Previous Topic: TO_DATE Function (merged 2) 10g
Next Topic: Table wide, partition wide and block level dictionary approach
Goto Forum:
  


Current Time: Sat Dec 03 22:34:25 CST 2016

Total time taken to generate the page: 0.10057 seconds