Home » Developer & Programmer » Forms » runtime error ora-12703 when running utl_mail (Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production)
runtime error ora-12703 when running utl_mail [message #416791] Tue, 04 August 2009 05:35 Go to next message
dayang_aziz@yahoo.com
Messages: 19
Registered: August 2009
Junior Member
hello,

I call a procedure through push button to use UTL_MAIL.send(..) and I got error ora-12703.
There is no error during compilation.

For your info, I manage to execute the same code on stored procedure using TOAD and I received the email sent using TOAD and telnet from my local.

Could anyone please help me on this.

Thanks,
Dayang
Re: runtime error ora-12703 when running utl_mail [message #416855 is a reply to message #416791] Tue, 04 August 2009 15:05 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Does this help?
Oracle
ORA-12703: this character set conversion is not supported

Cause: The requested conversion between two character sets in the CONVERT function is not implemented

Action: none

I wouldn't know how to solve the problem, sorry.
Re: runtime error ora-12703 when running utl_mail [message #416857 is a reply to message #416855] Tue, 04 August 2009 15:53 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Does Forms use a character set when connecting to the database? ( Don't know nothing about forms, but I had a somewhat similar problem sending mail once, and there it was a problem with the client character set. )

Maybe the character set from Toad matches the database character set, and the Forms one doesn't.

You could look in this AskTom thread for some hints on how to narrow down the problem.
Re: runtime error ora-12703 when running utl_mail [message #416868 is a reply to message #416857] Tue, 04 August 2009 19:39 Go to previous messageGo to next message
dayang_aziz@yahoo.com
Messages: 19
Registered: August 2009
Junior Member
Thank you for the response..
if anyone knows the solution for this, please help..
Wink

For info:
Forms developer version:
Forms [32 Bit] Version 10.1.2.0.2 (Production)
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

procedure:
Quote:

PROCEDURE test_email IS
BEGIN

UTL_MAIL.send (
sender => 'dayangku.masmaryam@lityan.com.my',
recipients => 'dayangku.masmaryam@lityan.com.my',
cc => 'dayangku.masmaryam@lityan.com.my',
bcc => 'dayangku.masmaryam@lityan.com.my',
subject => 'me send tru toad',
MESSAGE => 'me send tru toad.. test',
mime_type => 'text; charset=us-ascii',
priority => 3
);

END;


Regards,
Dayang

[Updated on: Tue, 04 August 2009 21:56]

Report message to a moderator

Re: runtime error ora-12703 when running utl_mail [message #416891 is a reply to message #416868] Wed, 05 August 2009 01:05 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Try 'text/plain'.

David
Re: runtime error ora-12703 when running utl_mail [message #416908 is a reply to message #416791] Wed, 05 August 2009 01:50 Go to previous messageGo to next message
dayang_aziz@yahoo.com
Messages: 19
Registered: August 2009
Junior Member
Thank you David for the response..

I've changed the code to
Quote:
mime_type => 'text/plain; charset=us-ascii',

and
Quote:
mime_type => 'text/plain',

both returned the same error..

Regards,
Dayang
Re: runtime error ora-12703 when running utl_mail [message #416910 is a reply to message #416908] Wed, 05 August 2009 01:58 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Okay, that was just a quick quess. What 'charset' are you using in MS Outlook? Could a difference there be the problem?

I searched this forum for 'utl_mail mime_type', and then this site, and then google. I think you will have to follow up the leads as there are quite a few of them. Try googling 'utl_mail mime_type outlook'.

Searching 'charset' was interesting http://www.orafaq.com/forum/m/416901/67467/?srch=charset#msg_416901

Also, try using 'utf-8'.

David
Re: runtime error ora-12703 when running utl_mail [message #416925 is a reply to message #416791] Wed, 05 August 2009 03:31 Go to previous messageGo to next message
dayang_aziz@yahoo.com
Messages: 19
Registered: August 2009
Junior Member
Hi David,

I'm sorry if I might ask s stupid question..
how could I know my MS Outlook's charset?
this is my MS Outlook version : Microsoft Office Outlook 2007 (12.0.4518.1014) MSO(12.0.6013.5000).

I tried to manipulate few charset such as utf-8, and iso-8859-1.
Both returned the same error.

However when I changed the charset in my procedure in TOAD, I could execute the procedure and received the emails.

For info, the db is locate at other server and I ran the form from my local machine.

I telnet to my db server as sys and 'ALTER SESSION SET smtp_out_server = 127.0.0.1'(my local machine)..

Regards,
Dayang
Re: runtime error ora-12703 when running utl_mail [message #416970 is a reply to message #416925] Wed, 05 August 2009 08:29 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
What text is the Forms procedure sending? I Toad you send

subject => 'me send tru toad',
MESSAGE => 'me send tru toad.. test',

Could it be that the data that Forms is sending has characters in it the Database Character set can't handle? Can you set the subject and message in the Forms procedure also to some "innocent" text?
Re: runtime error ora-12703 when running utl_mail [message #417061 is a reply to message #416925] Wed, 05 August 2009 19:42 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I have no knowledge of MS Outlook. For information on a MS product you do need to access a MS forum.

David
Re: runtime error ora-12703 when running utl_mail [message #417105 is a reply to message #416791] Thu, 06 August 2009 01:36 Go to previous messageGo to next message
dayang_aziz@yahoo.com
Messages: 19
Registered: August 2009
Junior Member
Hi All,

I tried another function that use utl_smtp to send email.
Again I could recieve email when I execute the function in TOAD but got error ora-12703 when I ran using forms.

When I ran the form, only "debug 1st" apear, then after that it returned error ora-12703.

Function:
Quote:
FUNCTION SEND_MAIL
(pIssuer IN VARCHAR2,
pReceiver IN VARCHAR2,
pSender IN VARCHAR2,
pSubject IN VARCHAR2,
pMessage IN VARCHAR2) RETURN VARCHAR2 IS

c utl_smtp.connection;
respuesta utl_smtp.reply;
pServer VARCHAR2(50) := '10.0.3.79';
CRLF CHAR(2) := CHR(13) || CHR(10);

BEGIN

message('debug 1st');
-- Abre la conexión al Server de correo
c := utl_smtp.open_connection(pServer);
message('debug2nd');
respuesta := utl_smtp.helo(c, pServer);

-- Inicia el Issuer del correo.
respuesta := utl_smtp.mail(c, pSender);

-- Inicia el Receiver
respuesta := utl_smtp.rcpt(c, pReceiver);

respuesta := utl_smtp.open_data(c);
-- Escribe la cabecera del e-mail
utl_smtp.write_data(c, 'From: ' || pIssuer || CRLF);
utl_smtp.write_data(c, 'To: ' || pReceiver || CRLF);
-- Escribe el Subject
utl_smtp.write_data(c, 'Subject: ' || pSubject || CRLF);
-- Escribe el texto del Message.
utl_smtp.write_data(c, CRLF || pMessage);
utl_smtp.write_data(c, CRLF || '.');

respuesta := utl_smtp.close_data(c);

-- Cierra la conexión
respuesta := utl_smtp.quit(c);

RETURN '0';

EXCEPTION
WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
utl_smtp.quit(c);
RETURN sqlerrm;
--raise_application_error(-20000,
-- 'El envío del email ha fallado devolviendo el siguiente error: ' || sqlerrm);
END;

Re: runtime error ora-12703 when running utl_mail [message #417269 is a reply to message #417105] Thu, 06 August 2009 19:21 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
ALWAYS place a 'pause' command after the message command. Alternatively DUPLICATE your message command.

David
Re: runtime error ora-12703 when running utl_mail [message #417502 is a reply to message #416791] Sun, 09 August 2009 23:04 Go to previous messageGo to next message
dayang_aziz@yahoo.com
Messages: 19
Registered: August 2009
Junior Member
Hi all,

Thanks for your responses and help. I do appreciate that.
Im not sure what is wrong with my utl_mail package. I still cannot send email using the package through my oracle forms. Sad
Somehow I've another workaround solution to send the email.
Im using OLE2 in webutil.

Here is the code:
Quote:
DECLARE
objOutlook OLE2.OBJ_TYPE;
objMail OLE2.OBJ_TYPE;
objArg OLE2.LIST_TYPE;
mail varchar2(2000);
alert_button NUMBER;

BEGIN

mail:='Hello World';

objOutlook := OLE2.CREATE_OBJ('Outlook.Application');
objarg := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(objarg,0);
objMail := OLE2.INVOKE_OBJ(objOutlook,'CreateItem',objarg);
OLE2.DESTROY_ARGLIST(objarg);

OLE2.SET_PROPERTY(objmail,'To','dayangku.masmaryam@lityan.com.my');
OLE2.SET_PROPERTY(objmail,'Subject','Test Send Email');
OLE2.SET_PROPERTY(objmail,'Body',mail);

OLE2.INVOKE(objmail,'Send');
OLE2.INVOKE(objmail,'Display');
OLE2.RELEASE_OBJ(objmail);
OLE2.RELEASE_OBJ(objOutlook);
END;


It works.. Smile

Regards,
Dayang
Re: runtime error ora-12703 when running utl_mail [message #417536 is a reply to message #416791] Mon, 10 August 2009 02:15 Go to previous message
dayang_aziz@yahoo.com
Messages: 19
Registered: August 2009
Junior Member
Hi all,

Another workaround solution.
I directly triggered the procedure that I created in database using toad from a push_button in my form.

It works.. Smile

But still wondering..Why it didnt work if I created new procedure (same code) in oracle forms.. Sad

Regards,
Dayang
Previous Topic: code for username and password in forms
Next Topic: call data from 2nd from to 1st form
Goto Forum:
  


Current Time: Sat Dec 10 16:39:51 CST 2016

Total time taken to generate the page: 0.04378 seconds