Email sending from oracle database facing problem
Hi Gurus,
Can anybody please help me..
I am stuck in sending Emails thru oracle server. Previously it was giving some error 421 of smtp transient error.
But now my complete code is running successfully, it seems that oracle server is sending the mail but
it is not relayed thru my smtp server as i am not received that test mail in my mail box.
In the body of the code I have tracked every step which is running smoothly without any error..
Do it require a static ip address???
Kindly help me to configure....
Thanks in advance..!!!
Regards,
Swati
Edited by: Swati Vyas on Jul 10, 2011 8:40 AM
For more about.. it check
http://asktom.oracle.com/pls/ask/f?p=4950:8:9516816346482415741::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:2118740358226
--Binny
Similar Messages
-
Sending a mail from oracle database
Hi,
I have a requirement to send a mail from oracle database.I use UTL_TCP package for this.Although my procedure is executed successfully,i dont get the mails in my inbox.Please help me to figure out a solution.
Thanks in advance....Hi, you must use UTL_SMTP package for send emails, it has more performance and features for debug. You must look the next code, this is a example for send emails.
DECLARE
c UTL_SMTP.CONNECTION;
PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
BEGIN
UTL_SMTP.WRITE_DATA(c, name || ': ' || header || UTL_TCP.CRLF);
END;
BEGIN
c := UTL_SMTP.OPEN_CONNECTION('smtp-server.acme.com');
UTL_SMTP.HELO(c, 'foo.com');
UTL_SMTP.MAIL(c, '[email protected]');
UTL_SMTP.RCPT(c, '[email protected]');
UTL_SMTP.OPEN_DATA(c);
send_header('From', '"Sender" <[email protected]>');
send_header('To', '"Recipient" <[email protected]>');
send_header('Subject', 'Hello');
UTL_SMTP.WRITE_DATA(c, UTL_TCP.CRLF || 'Hello, world!');
UTL_SMTP.CLOSE_DATA(c);
UTL_SMTP.QUIT(c);
EXCEPTION
WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
BEGIN
UTL_SMTP.QUIT(c);
EXCEPTION
WHEN UTL_SMTP.TRANSIENT_ERROR OR UTL_SMTP.PERMANENT_ERROR THEN
NULL; -- When the SMTP server is down or unavailable, we don't have
-- a connection to the server. The QUIT call will raise an
-- exception that we can ignore.
END;
raise_application_error(-20000,
'Failed to send mail due to the following error: ' || sqlerrm);
END;
Also review the next link for get more information about the UTL_SMTP packege.
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_smtp.htm#sthref15587
Regards. -
Email from Oracle database to any e-mail address....
Hi Guys,
I have been looking so many examples and material about sending e-mail from oracle database to any other e-mail address but couldn't find a clue.
Can someone tell me a simple way in Oracle9i database to send email messages on different e-mail addresses. Please with the help of code.
I just need to send a simple textual e-mail on 2 or more e-mail addresses. Thats all!
I want to do in database by creating a procedure or package just because i need to use this package on web also. I am using databse 9i release 1. Forms 6i for development and 9iAS to deploy my forms on web.
Please help, its really very urgent!
Imran BaigFor more about.. it check
http://asktom.oracle.com/pls/ask/f?p=4950:8:9516816346482415741::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:2118740358226
--Binny -
Send mail from oracle database 10g
Hi ,
I need to send a test mail from oracle database 10g to my gmail account through a stored procedure .
I will pass the list of recipents , subject and text of the mail through parameters .
Can anyone give me the code of the storerd procedure please ,
Thank you .hi, for example
DECLARE
mail_conn UTL_SMTP.connection;
smtp_relay VARCHAR2(32) := '172.16.x.x';
recipient_address VARCHAR2(64) := '[email protected]';
sender_address VARCHAR2(64) := '[email protected]';
mail_port NUMBER := 25;
msg VARCHAR2(200);
BEGIN
mail_conn := UTL_SMTP.open_connection(smtp_relay,mail_port);
UTL_SMTP.HELO(mail_conn, smtp_relay);
UTL_SMTP.MAIL(mail_conn, sender_address);
UTL_SMTP.RCPT(mail_conn, recipient_address);
UTL_SMTP.DATA(mail_conn, 'Payment request iniated');
UTL_SMTP.QUIT(mail_conn);
end; -
HTML Formated Email From Oracle Database
Hello,
I am generating email alerts from oracle 11g,10g using utl_mail.send.
I want to genrate/send email in HTML formated.
How i can send HTML formated email form Oracle Database (11g,10g)
Thanks In Advancehi,
inside oracle apex 10g. i am using this.
please try
begin
HTMLDB_MAIL.SEND(
P_TO => '[email protected]',
P_FROM => '[email protected]',
P_BODY => 'test',
P_BODY_HTML => '<table><tr><td>data</td></tr></table>' || SYSDATE,
P_SUBJ => 'Test Email working '
wwv_flow_mail.push_queue(
P_SMTP_HOSTNAME => 'localhost',
P_SMTP_PORTNO => '25'
end;
Thanks
LOGA
www.go-websoft.com
Apex Consulting & Development -
How to send a mail automatically based on a date from ORACLE database
Hi,
I want to send a mail automatically based on a date from ORACLE database.
Please help me.
thanks
--Saraprograms are available on net to send mail directly from oracle ie procedure s in oracle sending mails
-
Empty CLOB field value from Oracle database using JDBC Sender
Hi All,
I am selecting a CLOB field from Oracle database table using JDBC Sender adapter and getting error "NullPointerException"
Seen SAP note 1283089 but its not applicable for my support pack PI 7.0 SP 12 and client dont want to upgrdate SP 17 right now.
I tried rpad(1,0)Column_Name funciton in JDBC select query but it selcting blank value for every record even those having some value for this CLOB field so not useful
Could anybody suggest possible way? client dont want to change anything at database side.
Thanks,
DharamveerWhat is the Oracle driver version installed? You might need to install 10.x driver if not already using it.
-
Help sending out long email message from ORACLE PL/SQL
Hello,
I need help sending out long email message from ORACLE PL/SQL.
My message(email body) contains about 4000 characters and comes out truncated somewhere on the middle.
My business requirements do not allow me to send it as attachment.
I am using oracle utl_smtp package and on oracle 10gR2.
Is it possible to send out long text message from Oracle?
Thanks!
IaThank you very much for your responses.
Even if I use email procedure below my message is getting truncated.
Here is how I am trying to execute the procedure from sql plus:
DECLARE
P_SENDER VARCHAR2(32767);
P_RECIPIENT VARCHAR2(32767);
P_SUBJECT VARCHAR2(32767);
P_BODY VARCHAR2(32767);
BEGIN
P_SENDER := 'xxxx@yyy';
P_RECIPIENT := 'xxxx@yyy';
P_SUBJECT := 'long text message';
P_BODY :=
'1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
7 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
8 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
9 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
10 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
11 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
12 34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
21 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789';
EMAIL ( P_SENDER, P_RECIPIENT, P_SUBJECT, P_BODY );
COMMIT;
END;
SQL> @long_sp;
PL/SQL procedure successfully completed.
The email message is:
long text message
xxx@yyyy
Sent: Tuesday, May 25, 2010 6:52 AM
To:
xxx@yyyy
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 7 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 8 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 9 12345678901234567890123456789012345678901234567890123456789012345678901234
Message is getting truncated around 1000 characters.
What am I doing wrong?
Please help!
Thanks!! -
How to Send SMS from Oracle Database to Mobile
Hi All,
I need urgent help in how to send sms from oracle database to mobile
thanks and best regardsyou can use smslib..... . i have made a program with this. its working fine with oracle database.
see the links here ...
http://halimdba.blogspot.com/2011/08/send-sms-from-oracle-database-with.html
by the way, how you can say "urgent help" ?
regards
Halim -
Send and recieve sms from oracle(database+application server)
HI all
I Wanted to send and recieve SMS not mails from oracle(database/application server).any possible solutions and what are the things that i required for that.i-e any service provider or any machine or somethings else.Handle: taimur
Status Level: Newbie
Registered: Aug 3, 2009
Total Posts: 42
Total Questions: 16 (16 unresolved)
so many questions without ANY answers.
http://forums.oracle.com/forums/ann.jspa?annID=718
http://www.lmgtfy.com/?q=oracle+send+sms
Edited by: sb92075 on Nov 20, 2010 7:23 PM -
Send sms from oracle database/application server
HI all
I Wanted to send and recieve SMS not mails from oracle(database/application server).any possible solutions and what are the things that i required for that.i-e any service provider or any machine or somethings else.and secound thing can i use wirless server and what are the requirments for thatHandle: taimur
Status Level: Newbie
Registered: Aug 3, 2009
Total Posts: 42
Total Questions: 16 (16 unresolved)
so many questions without ANY answers.
http://forums.oracle.com/forums/ann.jspa?annID=718
http://www.lmgtfy.com/?q=oracle+send+sms -
How to mail pdf file from oracle database 11g
Hi,
Using following code to send pdf file from oracle database.
DECLARE
v_From VARCHAR2(80) := '[email protected]';
v_Recipient VARCHAR2(80) := '[email protected]';
v_Subject VARCHAR2(80) := 'test subject';
v_Mail_Host VARCHAR2(30) := '116.214.31.249';
v_Mail_Conn sys.utl_smtp.Connection;
crlf VARCHAR2(2) := chr(13)||chr(10);
BEGIN
v_Mail_Conn := sys.utl_smtp.Open_Connection(v_Mail_Host, 26);
sys.utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
sys.utl_smtp.Mail(v_Mail_Conn, v_From);
sys.utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
sys.utl_smtp.Data(v_Mail_Conn,
'Date: ' || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf ||
'From: ' || v_From || crlf ||
'Subject: '|| v_Subject || crlf ||
'To: ' || v_Recipient || crlf ||
'MIME-Version: 1.0'|| crlf || -- Use MIME mail standard
'Content-Type: multipart/mixed;'|| crlf ||
' boundary="-----SECBOUND"'|| crlf ||
crlf ||
'-------SECBOUND'|| crlf ||
'Content-Type: text/plain;'|| crlf ||
'Content-Transfer_Encoding: 7bit'|| crlf ||
crlf ||
'some message text'|| crlf || -- Message body
'more message text'|| crlf ||
crlf ||
'-------SECBOUND'|| crlf ||
'Content-Type: file;'|| crlf ||
' name="D:\mail\pdfSample.pdf"'|| crlf ||
'Content-Transfer_Encoding: 8bit'|| crlf ||
'Content-Disposition: attachment;'|| crlf ||
' filename="D:\mail\pdfSample.pdf"'|| crlf ||
crlf ||
'CSV,file,attachement'|| crlf || -- Content of attachment
crlf ||
'-------SECBOUND--' -- End MIME mail
sys.utl_smtp.Quit(v_mail_conn);
EXCEPTION
WHEN sys.utl_smtp.Transient_Error OR sys.utl_smtp.Permanent_Error then
raise_application_error(-20000, 'Unable to send mail: '||sqlerrm);
END;
Above code executed successfully and mail is send to recipient but file is corrupted.
I think it doesn't pick file from specified location, attachment name is appearing like this 'D:mailpdfsample.pdf
Oracle Database : 11g R2
O.S : windows 7 Professional
Thanks in Advanceparapr wrote:
sys.utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);The above violates RFC 5321 section 4.1.1.1
'-------SECBOUND'|| crlf ||
'Content-Type: file;'|| crlf ||
' name="D:\mail\pdfSample.pdf"'|| crlf ||
'Content-Transfer_Encoding: 8bit'|| crlf ||
'Content-Disposition: attachment;'|| crlf ||
' filename="D:\mail\pdfSample.pdf"'|| crlf ||Invalid Mime header above. Filename are logical. Not physical. Loose the drive and directory names. The filename is there to name the Mime body's content.
crlf ||
'CSV,file,attachement'|| crlf || -- Content of attachmentHow is the above PDF content? This is a string containing the text CSV,file,attachement. Which means when this is what is saved as a PDF file by the mail reader.
EXCEPTION
WHEN sys.utl_smtp.Transient_Error OR sys.utl_smtp.Permanent_Error then
raise_application_error(-20000, 'Unable to send mail: '||sqlerrm);
END;Silly. Why change meaningful exceptions into a generic meaningless exception?? That does not make any sense. -
Error calling BLS from oracle database
Hi Experts,
We have a scenario in which we are calling BLS from oracle database using trigger. The call is made using the following URL:
http://<Host name>:50000/XMII/Runner?Transaction=<TRX_Path>&Material=MATNR&Pallet_id=PALLET&Plant=PLANT&Proc_order=PROC&Prodline=PROD&Quantity=QTY&Start_Date=DAT&Start_Time=TIM&Status=STAT&UOM=UOM1&User_name=USER&OutputParameter=*
This used to work fine in 11.5 but when we upgraded to 14.0 it is not working. We have maintained server details in \etc\host file.
We were getting error in file 'Error 1 Text.txt'. "A possible Cross-Frame Scripting attack has been prevented. Please contact your system administrator or refer to" this was the last error message. We checked this on SCN and based on the search results we have implemented SAP note 1651004 wherein setting in netweaver is required to be changed. After note was implemented we are getting another error text ('Error 2 Text.txt') "This will happen if the browser running the page tha". We tried a few ways but could not capture the full message coming.
Has anybody of faced similar problem? I would highly appreciate any hint which could help in solving this problem.
System Information:
NW 7.31 SP 10
Oracle 11.2.0.4
MII 14.0 SP5 patch 7
Regards,
DarshanHi Christian/Anushree,
I have now modified the URL by adding Illum login name and password:
http://<Host name>:50000/XMII/Runner?Transaction=<TRX_Path>&Material=MATNR&Pallet_id=PALLET&Plant=PLANT&Proc_order=PROC&…
When i run the url in browser it gives me the expected results but when i try to trigger it from Oracle i am still getting the error as below:
"<script>
var inPortalScript = false
var webpath = "/logon_ui_resources/"
</script>
<html>
<head>
<BASE target="_self">
<link rel=stylesheet href="/logon_ui_resources/css/ur/ur_ie5.css">
<title>User Management, SAP AG</title>
<script language="javascript">
var originWindowName=window.name;
window.name="logonAppPage";
function restoreWindow() {
try{
window.name=originWindowName;
} catch(ex){}
</script>
<script language="JavaScript">
function putFocus(formInst, elementInst) {
if (document.forms.length > 0) {
document.forms[formInst].elements[elementInst].focus();
function setValuesAutoCreation() {
var form = document.getElementById('logonForm');
form.j_username.value="";
form.j_password.value="";
form.automaticAccountCreation.value="true";
function submitForm() {
var form = document.getElementById('logonForm');
form.submit();
function clearEntries() {
document.logonForm.longUid.value="";
document.logonForm.password.value="";
function setFocusToFirstField() {
myform = document.logonForm;
try{
for (i=0; i<myform.length; i++) {
elem = myform.elements[i];
if (!elem.disabled) {
elemType = elem.type;
if (elemType=="text" || elemType=="password") {
if (!elem.readOnly) {
elem.focus();
break;
if (elemType=="select-one" || elemType=="select-multiple" || elemType=="checkbox" || elemType=="radio") {
elem.focus();
break;
} catch(ex){
function addTenantPrefix() {
return true;
</script>
</head>
<body class="urBdyStd" bgcolor="#F7F9FB" onLoad="setFocusToFirstField()" onUnload="restoreWindow()">
Thanks,
Darshan
<script language="JavaScript">
var blockPage = false;
</script>
<script language="JavaScript">
try {
if (top.document.domain != self.document.domain) {
blockPage = true;
} catch (error) {
// This will happen if the browser running the page tha" -
REP-0159 when run_product from oracle database
Hi,
I can`t open report from oracle database. I have this products (Windows NT 4):
Oracle8i Enterprise Edition Release
8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
Report Builder 6.0.8.8.3
ORACLE Server Release 8.0.6.0.0
Forms [32 Bit] Version 6.0.8.8.0
(Production)
This is the code in the forms:
____DECLARE
____ vs_program_name VARCHAR2(30);
____ pl_id PARAMLIST;
____ pl_name VARCHAR2(60);
____BEGIN
____ pl_name := 'Unloading';
____ pl_id := GET_PARAMETER_LIST(pl_name);
____ IF NOT ID_NULL(pl_id) THEN
____ DESTROY_PARAMETER_LIST(pl_id);
____ END IF;
____ pl_id := CREATE_PARAMETER_LIST(pl_name);
____ IF ID_NULL(pl_id) THEN
____ Message('Error ...!');
____ ELSE
____ vs_program_name := 'victor';
____ ADD_PARAMETER
____ (pl_id, 'pv_admission_nbr',
____ TEXT_PARAMETER, 'hola');
____ Run_Product(REPORTS, vs_program_name, ____ SYNCHRONOUS, RUNTIME, DB, pl_id);
____ END IF;
____end;
This is the error message in server report:
REP-0159: Syntax error on command line.
I need help, any idea?<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Randall Roberts ([email protected]):
If the Reports runtime process actually has been launched, there will be a button for it on your taskbar. Click the button and a little empty window opens. But from the menu bar in the window you can select an option that shows the actual error generated by reports runtime.<HR></BLOCKQUOTE>
Thanks!
This is the error message:
Error submitting report [Sun May 20 20:12:59 2001] ...
REP-0159: Syntax error on command line.
and this is the form code:
DECLARE
vs_program_name VARCHAR2(30);
pl_id PARAMLIST;
pl_name VARCHAR2(60);
BEGIN
pl_name := 'Unloading';
pl_id := GET_PARAMETER_LIST(pl_name);
IF NOT ID_NULL(pl_id) THEN
DESTROY_PARAMETER_LIST(pl_id);
END IF;
pl_id := CREATE_PARAMETER_LIST(pl_name);
IF ID_NULL(pl_id) THEN
Message('Error to create parameters list, please call support...!');
ELSE
vs_program_name := 'victor';
ADD_PARAMETER(pl_id, 'pv_admission_nbr', TEXT_PARAMETER, 'hola');
Run_Product(REPORTS, vs_program_name, SYNCHRONOUS, RUNTIME, DB, pl_id,null);
END IF;
end;
Can you help me?
null -
Performance Issue: Retrieving records from Oracle Database
While retrieving data from Oracle database we are facing performance issues.
The query is returning 890 records and while displaying it on the jsp page, the page is taking almost 18 minutes for displaying records.
I have observed that cpu usage is 100% while processing the request.
Could any one advise what are the methods at DB end or Java end we can think of to avoid such issues.
Thanks
R.passion_for_java wrote:
Will it make any difference if I select columns instead of ls.*
possibly, especially if there's a lot or data being returned.
Less data over the wire means a faster response,
You may also want to look at your database, is that outer join really needed? Does it perform? Are your indexes good?
A bad index (or a missing one) can kill query performance (we've seen performance of queries drop from seconds to hours when indexes got corrupted).
A missing index can cause full table scans, which of course kill performance if the table is large.
Maybe you are looking for
-
Problems saving resources in Web Inspector
Often I want to save images from web inspector. But I'm having a couple of problems. 1. "Open Image in New Window" does nothing. 2. "Download Image" saves the image, but names it Unkown and without a file extension. Has anyone been able to get either
-
Z quotation type not getting picked up in create quotation workcenter link
Dear Webui experts, We have a custom quotation type created from copying the standard one AGIS. The workcenter link for create quotation works fine and displays list of quotations standard available in the system, but does not display the custom crea
-
External Samsung Display broken @ 1920x1080 after Lion upgrade
Hi, The more I use Mac OS 10.7 Lion the more I notice it's defects and the more I get upset with it. After the WIFI issue (wifi network does not reconnect after sleep mode) I am now facing an issue with my external display. I have actually two MacBoo
-
4 odd issues with Leopard Finder
Leopard is great, I just have a few things that seem off. 1) Every-time I restart, I lose the preference for what app opens .wav, .aif, .mp3, and all other audio files. I have to again, right-click, select open with, change-all. Every-time. Can anyon
-
Can't reset my apple id password - don't receive email
Trying to reset my apple id password via email. I click "Email authentication" and get a confirmation that an email has been sent. But I don't receive an email. Can it be that using an apple id / email address like [email protected] causes problems?