Problem in sending email from oracle
Hi,
I am using UTL_SMTP.write_data to build the email structure. And all the emails are going properly. But the problem is if i add more reciepants in the CC list then the emails are going properly. But it is not shoing all the reciepants list in the CC list after it reaches to the reciepants.
Please help on this..
Regards,
Bond....
I am not getting this "But i am combining CC list and i am sending only once for CC."..
As, I said earlier, you have to add UTL_RCPT for each recepient. For example, if you have CC list into some variable p_cc as comma separated list, then you can do something like this:
ll_cc := '[email protected],[email protected],[email protected]';
loop
exit when l_to is null;
n := instr( l_cc, ',' );
IF n =0 THEN exit; end if;
l_tmp := substr( l_cc, 1, n-1 );
l_cc := substr( l_cc, n+1 );
utl_smtp.rcpt( l_tmp );
end loop;
end;PS: Not tested.
Similar Messages
-
ACL error when sending email from Oracle 11g
Hi,
It returned something like "error...ACL security" when I tried to send email from Oracle 11g. Is there any security thing that I need to release in Oracle 11g? I used to send emails from Oracle 10g and didn't find any problem.
Thanks.
AndyIn Database 11g Oracle introduced Network Access Control Lists (ACLs) to protect the database from users using the many internet-capable packages such as UTL_INADDR, UTL_HTTP, UTL_TCP, etc.
Read all about it in the docs and look at the code demos here:
http://www.morganslibrary.org/library.html
under DBMS_NETWORK_ACL_... -
How to sending email from Oracle 6i(Forms)
How can I send email from Oracle Forms(6i).
I need to send email to a distribution list(multiple email addresses).send email of multiple email address
[email protected],[email protected],[email protected]
create or replace function mailout
(sender in varchar2,
recipient in varchar2,
ccrecipient in varchar2,
subject in varchar2,
message in varchar2) return number
is
crlf varchar2(2) := chr(13)||chr(10);
connection utl_smtp.connection;
mailhost varchar2(50) := 'Add email server Ip Address here';
header varchar2(4000);
v_num number :=1;
str number:=0;
email varchar2(50);
begin
connection := utl_smtp.open_connection(mailhost,25);
header := 'Date: '||to_char(sysdate,'dd mon yy hh24:mi:ss')||crlf||
'From: '||sender||' '||crlf||
'Subject: '||subject||crlf||
'To: '||recipient||crlf||
'Cc: '||ccrecipient||crlf||message;
utl_smtp.helo(connection,mailhost);
utl_smtp.mail(connection,sender);
utl_smtp.rcpt(connection,recipient);
while (instr(ccrecipient,',',1,v_num)>0) loop
email:=substr(ccrecipient,str+1,instr(ccrecipient,',',1,v_num)-str-1);
dbms_output.put_line(email);
utl_smtp.rcpt(connection,email);
str:=instr(ccrecipient,',',1,v_num);
v_num:=v_num+1;
end loop;
utl_smtp.open_data(connection);
-- utl_smtp.write_data(connection,header);
utl_smtp.write_data(connection,'MIME-Version:1.0'||crlf||'Content-type:text/html'||crlf||header);
utl_smtp.close_data(connection);
utl_smtp.quit(connection);
return 0;
exception
when utl_smtp.invalid_operation then
dbms_output.put_line('Invalid Operation in SMTP transaction');
return 1;
when utl_smtp.transient_error then
dbms_output.put_line('Temporary problem with sending email ');
return 2;
when utl_smtp.permanent_error then
dbms_output.put_line('Permanent problem with sending email ');
return 3;
end; -
How to sending email from Oracle Forms
How to sending email from Oracle 6i(Forms)
I need to send email to a distribution list(multiple email addresses).send email of multiple email address
[email protected],[email protected],[email protected]
create or replace function mailout
(sender in varchar2,
recipient in varchar2,
ccrecipient in varchar2,
subject in varchar2,
message in varchar2) return number
is
crlf varchar2(2) := chr(13)||chr(10);
connection utl_smtp.connection;
mailhost varchar2(50) := 'Add email server Ip Address here';
header varchar2(4000);
v_num number :=1;
str number:=0;
email varchar2(50);
begin
connection := utl_smtp.open_connection(mailhost,25);
header := 'Date: '||to_char(sysdate,'dd mon yy hh24:mi:ss')||crlf||
'From: '||sender||' '||crlf||
'Subject: '||subject||crlf||
'To: '||recipient||crlf||
'Cc: '||ccrecipient||crlf||message;
utl_smtp.helo(connection,mailhost);
utl_smtp.mail(connection,sender);
utl_smtp.rcpt(connection,recipient);
while (instr(ccrecipient,',',1,v_num)>0) loop
email:=substr(ccrecipient,str+1,instr(ccrecipient,',',1,v_num)-str-1);
dbms_output.put_line(email);
utl_smtp.rcpt(connection,email);
str:=instr(ccrecipient,',',1,v_num);
v_num:=v_num+1;
end loop;
utl_smtp.open_data(connection);
-- utl_smtp.write_data(connection,header);
utl_smtp.write_data(connection,'MIME-Version:1.0'||crlf||'Content-type:text/html'||crlf||header);
utl_smtp.close_data(connection);
utl_smtp.quit(connection);
return 0;
exception
when utl_smtp.invalid_operation then
dbms_output.put_line('Invalid Operation in SMTP transaction');
return 1;
when utl_smtp.transient_error then
dbms_output.put_line('Temporary problem with sending email ');
return 2;
when utl_smtp.permanent_error then
dbms_output.put_line('Permanent problem with sending email ');
return 3;
end; -
Problem in Sending email from Reports Queue Manager
Hi
I am getting problem in sending email from reports queue manager.
It says that error in logging to mail server.
If any body knows the sol then pl help me out.
thanksHi
I am getting problem in sending email from reports queue manager.
It says that error in logging to mail server.
If any body knows the sol then pl help me out.
thanks -
Sending email from Oracle through Lotus Domino Server
Hi,
I would like to know whether it is possible to send an email from Oracle through a Lotus Domino Server(acting as mail server). If yes, please provide me with the details.
Thanks in advanceHave a look at the database UTL_SMTP package
-
Dear member & developers
I want to send e mail from oracle application. If anybody knows, how to do this. please write or send a sample application or forms or database sql. I don't restricted to any application version like 10g or 11g same as database...
I seriously need it.
Thanks in Advanced.As Francois indicated - there are multiple examples around the internet and in the forums. Any email solution you choose is going to require that you have access to a valid email server (SMTP, POP3, etc). Also, the solution is dependent on "Where" you want to send the email from. I prefer a database solution because this makes it available to your entire database application, but you can use a Java email method (using Forms PJC or Java Bean) or you can OLE link to Microsoft Outlook.
Take a look at Send Email from the Database. I wrote this package based on the DEMO_MAIL package provided by Oracle (via OTN) and stream line things a bit. There is an example of how to use the package in the article.
Take a look at Send email with HTML body and local file attachements article on Franscois's web site for an example of sending email from an Oracle Form using Java.
If you need to use Outlook - search the forum. I don't consider this to be a reasonable method so I don't use it or recommend it. I'm sure it works fine for others, I just think being dependent on a application installed on the client is not a solid solution. That's just my opinion. ;-)
I search through out the net. Didn't get any tutorial video or any working materiel. I disagree with this statement - I did a quick Google search and found many examples (no videos) and demo's.
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly. -
Send email from oracle xe table
Hi, just a question, does any one know if oracle has any built in email functionality ?
I have an oracle xe table with email addresses in it, I want to send emails using the addresses.
Yes I know I can connect to it with many things and send emails, but I was wondering if there is any way to send directly from oracle ?Jay wrote:
Hi, just a question, does any one know if oracle has any built in email functionality ?
I have an oracle xe table with email addresses in it, I want to send emails using the addresses.
Yes I know I can connect to it with many things and send emails, but I was wondering if there is any way to send directly from oracle ?They do, it's outlined in the documentation (i assume you're using XE).
http://download.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25309/wrkspc.htm#HTMDB08010 -
Hi all
I have a requirement to send emails to managers internal to the company from oracle whenever the orders placed by customers are not acknowleded in certian time like within 6 hrs or so.I could figure out the logic but dont know how to send an email from oracle.
my logic:
creating a job which will be scheduled to run every 4 or 5 hrs.this job runs a stored procedure which does all the logic and sends an email.
any suggesions or source is greatly appreciated.
thanks and regards in advance
yugandharHi,
for scheduling a job use dbms_job package and to send emails use utl_smtp package is available oracle 8.1.6 and above hope this helps you
prem -
Sending email from Oracle Forms with attachments
Hi,
Is there any package or option available in Oracle forms to send email with attachments?
Your reply will be highly appreciated.
Regds,
nonedaThere are a couple of ways to send email (with attachements) from Oracle Forms. Check out these links to some examples.
using OLE2 or CLIENT_OLE2 to access a mail-client via Mail-Api ( Get and set Outlook properties )
using MAILTO in conjunction with HOST or CLIENT_HOST to "start" a mail-client ( Re: Open Microsoft Outlook new massage with TO containing the email address )
using UTL_SMTP for database-side-mailing ( Re: Send mail with attachment )
Hope this helps,
Craig... -
Problems with send emails from 2nd account
Hi,
I have problems to sent from a 2nd account. Sending emial via my icloud account works excellent. But if I want to sent emails via my 2nd account I got the message
" Can't sent emails - Adresse [email protected] was declied from server, because forward is not allowed"
I heard that the server has to setup to allow forwrding emails from a 2nd account. Where could I find this?
Thnaks
MichaelI believe CF5 had an issue with 0 byte mails in the spool.
Test your mail to confirm that you do not attempt to send a 0 byte
mail. -
Monitor sending emails from Oracle level
Want to monitor sending of emails from scot at the oracle level. I know tables SOST is used, not sure what fields could be monitored to determine if emails are just sitting in queue.
Hi,
Check out http://www.oracle.com/pls/xe102/search?remark=advanced_search&word=email&format=ranked&format=drilldown&book=&preference=
(and bookmark http://www.oracle.com/pls/xe102/homepage ;) ) -
Problems with sending emails from my Blackberry BIS account - all on one line
I am using a BB Storm 9500 and have been trying to use the BIS email account.
However, whenever I reply or forward emails from my device, the email comes out all on one line regardless of the punctuation I put in.
My signature also appears on one line despite having formatted it differently.
I've seen some post on this problem before but I wondered whether anyone has resolved it now. It's a pain because when responding to work emails it looks completely unprofessional.
Cheers
TJEanyone try it? any use?
dc -
Problem in sending emails from SAP
Hi All,
We have recently upgraded our system from 4.6C to ECC6. A background job that is supposed to send emails is not sending the mail to the users. When I check in the batch user's outbox, I can find the email sitting in the outbox. The mails were sent successfully prior to upgrade.
I'm using SO_OBJECT_SEND to send the mail. Can any one please suggest what I need to do to send the emails.
Thanking you in anticipation.
Regards,
RajaniHi Rajani,
Please check these thread
ALV reports emailed in background job
Mail report spool as an attachment in a background job :)
Sending mail in PDF format in background
A nice code sample is here
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8cd6adbb-0301-0010-39ba-938c601d5db9
All the Best !! Award points if useful -
Sending Email from Oracle BPM 11.1.1.4
Hi,
From my process i want to send an email to non- workspace user. How to do that.
Am aware of the 11.1.1.6 Notifications, but my client requires 11.1.1.4 version
Its urgent.
Thanks,
PriyaWe used java Mail API to send emails in 11.1.1.5 + Feature Pack too.
Though as you said PS5 has this new feature - http://technology.amis.nl/2012/05/18/proces-email-with-the-new-ums-adapter-of-soa-suite-ps5/
Maybe you are looking for
-
Discrepancy in the table payr, need urgent help
Dear All, i have one table payr in logical database. 2 fields of it i,e kunnr and vblnr When i goto se16 and select the data for say kunnr = '2901350' and vblnr = '20002000' Now what happens for this combination i get no data found. but say i enter o
-
After Mavericks installation on my Macbook Pro mid-2012 (non-retina), the fonts appear slightly fuzzy, the graphics seems less crisp and the colors are just "off". This issue seems to be system wide but is much worse whilst using Safari for some reas
-
Have downloaded video but can't get closed captions?
Have downloaded video from Apple TV, and while it shows it should contain Closed caption, I can't find a way of getting them up on screen when replaying. Any thoughts?
-
How to build an SQL Query to print Week ranges of a Month
Hi Gurus!! I have a requirement to create a query to display the Week periods of a month. The inputs will be Year and month. The result should be some thing like this: If Year = 2009 and Month = June The SQL Query should return the following: 01-Jun-
-
Looking for help finding a digital recorder that's compatible
I am looking to purchase a digital voice recorder that's compatible with my MacBook Pro. I want to record voice, import it to my Mac and then post it on the web. I don't want to have to buy software and install it if I don't have to. I bought an Olym