Mail user send 10 times to the CC, I need to mail send only once to CC. Loop problem
Dear Sir.In my application, I created a survey then it goes to HOD HOD assign to the group or Indivitual User.if HOD assign inquiry to ressemelable it to the group. Then send Mail to all users in the Group and send mail to the user who who after investigation.
Suppose that the Group has 10 users.
But now my problem is when I select the group then mail send to the group users (10) but 10 send mail to users that query.i Post uses CC who has the Post request.
I don't need that once mail send to the user who posts this request nothing 10 times.
It's looped .loop is fire 10 times for the CC, I need fire once for CC.
How can I do that.
My Code is.
DECLARE
l_id number;
to_add varchar2(1000);
to_sub_by varchar2(1000);
from_add varchar2(1000);
l_body varchar2(4000):=:P33_DESCRIPTION;
l_sub varchar2(1000):=:P33_SUBJECT;
I_case varchar2(10):=:P33_CASE_ID;
I_isue_dte date:=:P33_SUBMITTED_ON;
l_regd varchar(100);
CURSOR C1 IS SELECT EMAIL_ID,(SELECT EMAIL_ID FROM USER_MAS WHERE USER_ID =:P33_SUBMITTED_BY_ID) AS D FROM USER_MAS WHERE USER_GR_ID=:P33_ASSIGNED_TO_GROUP_ID AND USER_ID NOT IN(:APP_USER);
BEGIN
if :P33_ASSIGNED_TO_GROUP_ID is not null then
open C1;
LOOP
FETCH C1 INTO to_add,to_sub_by;
EXIT WHEN C1%NOTFOUND;
select email_id,user_name into from_add,l_regd from user_mas where user_id=:app_user;
l_id:=APEX_MAIL.SEND(
p_to => to_add, -- change to your email address
P_cc => to_sub_by,
p_from => from_add,
p_body => 'Issue Information'||''||chr(13)||chr(10)||chr(13)||chr(10)||
'www.farhorizonindia.net:7777/crm'||''||chr(13)||
'Issue Title'||':'||l_sub||CHR(13)||chr(10)||
'Issue Number'||':'||I_case||CHR(13)||
'Issue Open Date'||':'||I_isue_dte||''||chr(13)||chr(10)||CHR(13)||chr(10)||
'Most Recent Comment'||':'||''||chr(13)||chr(10)||
l_body||chr(13)||chr(10)||''||CHR(13)||chr(10)||'Regards'||chr(13)||chr(10)||''||l_regd||CHR(13)||chr(10)||CHR(13)||chr(10)||'Please do not reply to this email.If you wish to update the call.please login to the issue Management.',
P_subj => I_case ||' Issue '||l_sub);
end loop;
close C1;
end if;
COMMIT;
apex_mail.push_queue(
P_SMTP_HOSTNAME => '102.111.0.9',
P_SMTP_PORTNO => 25);
commit;
END;
How to solve it.Thank you
Published by: Sophie on June 22, 2011 05:17
Published by: Sophie on June 22, 2011 20:57
Published by: Sophie on June 22, 2011 22:52
Published by: Sophie on June 23, 2011 12:11 AM
Published by: Sophie on June 23, 2011 01:15
Hello
Maybe like this:
DECLARE
l_id number;
to_add varchar2(1000);
to_sub_by varchar2(1000);
from_add varchar2(1000);
l_body varchar2(4000):=:P33_DESCRIPTION;
l_sub varchar2(1000):=:P33_SUBJECT;
I_case varchar2(10):=:P33_CASE_ID;
I_isue_dte date:=:P33_SUBMITTED_ON;
l_regd varchar(100);
CURSOR C1 IS SELECT EMAIL_ID FROM USER_MAS WHERE USER_GR_ID=:P33_ASSIGNED_TO_GROUP_ID AND USER_ID NOT IN(:APP_USER);
BEGIN
if :P33_ASSIGNED_TO_GROUP_ID is not null
then
-- do this query once!
select email_id,user_name into from_add,l_regd from user_mas where user_id=:app_user;
-- first send a mail for the CC email
SELECT EMAIL_ID into to_sub_by FROM USER_MAS WHERE USER_ID =:P33_SUBMITTED_BY_ID;
--email
l_id:=APEX_MAIL.SEND(
p_to => to_sub_by, -- only the cc email
p_from => from_add,
p_body => 'Issue Information'||''||chr(13)||chr(10)||chr(13)||chr(10)||
'www.farhorizonindia.net:7777/crm'||''||chr(13)||
'Issue Title'||':'||l_sub||CHR(13)||chr(10)||
'Issue Number'||':'||I_case||CHR(13)||
'Issue Open Date'||':'||I_isue_dte||''||chr(13)||chr(10)||CHR(13)||chr(10)||
'Most Recent Comment'||':'||''||chr(13)||chr(10)||
l_body||chr(13)||chr(10)||''||CHR(13)||chr(10)||'Regards'||chr(13)||chr(10)||''||l_regd||CHR(13)||chr(10)||CHR(13)||chr(10)||'Please do not reply to this email.If you wish to update the call.please login to the issue Management.',
P_subj => I_case ||' Issue '||l_sub);
-- Now the loop throught the users from the group
open C1;
LOOP
FETCH C1 INTO to_add;
EXIT WHEN C1%NOTFOUND;
l_id:=APEX_MAIL.SEND(
p_to => to_add, -- change to your email address
-- P_cc => to_sub_by, -- no more CC
p_from => from_add,
p_body => 'Issue Information'||''||chr(13)||chr(10)||chr(13)||chr(10)||
'www.farhorizonindia.net:7777/crm'||''||chr(13)||
'Issue Title'||':'||l_sub||CHR(13)||chr(10)||
'Issue Number'||':'||I_case||CHR(13)||
'Issue Open Date'||':'||I_isue_dte||''||chr(13)||chr(10)||CHR(13)||chr(10)||
'Most Recent Comment'||':'||''||chr(13)||chr(10)||
l_body||chr(13)||chr(10)||''||CHR(13)||chr(10)||'Regards'||chr(13)||chr(10)||''||l_regd||CHR(13)||chr(10)||CHR(13)||chr(10)||'Please do not reply to this email.If you wish to update the call.please login to the issue Management.',
P_subj => I_case ||' Issue '||l_sub);
end loop;
close C1;
end if;
COMMIT;
apex_mail.push_queue(
P_SMTP_HOSTNAME => '102.111.0.9',
P_SMTP_PORTNO => 25);
commit;
END;
Herald tiomela
http://htendam.WordPress.com
Tags: Database
Similar Questions
-
Windows 10. Control user account each time to the home page. STINKS! Is there a solution?
A possible cause of this message, it is that Firefox is configured to run as administrator.
Make sure that Firefox is not set to run as administrator.
Right click on the desktop Firefox shortcut and choose "Properties".
Make sure that all items are disabled in the tab "Compatibility" of thz
e Properties window.- Privilege level: "Run this program as Administrator" should not be selected
- "Run this program in compatibility mode for:" must not be selected
-
I tried, on and off for three days download Lightroom 5 I bought in good faith a price of commercial version free. I tried at various times of the night and usually do about 30% downloaded once getting to 99% with 1 sec each time of seven or eight tests, it had frozen. I bought this product in good faith. I had a very expensive (bought only three months ago) PC Windows 7 with water and huge hard drives cooling system with more RAM than anyone I know not. It is not good enough. When I read your solutions for my problem, I read on the things written in the words I don't understand. All I want is Lightroom 5 I won't learn all this from gobble *... I'm nearly seventy eight years... I don't have three days to mess around with your exhaust system to provide me with a product I want to use today.
Installation errors can have all sorts of causes that should not necessarily be attributed to the material. Have you followed the standard procedures turn off security tools that may interfere? If not find newspapers install could clarify things.
The problems with the Setup logs. CS5, CS5.5, CS6, CC
Mylenium
-
Original title: the computer geek
Follow-up of the steps to install the hp wireless printer and it worked only once. Now he says it is "offline." Convenience store said that it cannot solve the problem. That's happened?
Hello
1. What is the brand and model of the printer?
2. don't you make changes on the computer recently before this problem?
3. What is the full and exact error message?Step 1: The procedure below can help you to fix this problem.
a. Click Start > Control Panel > printer and faxes
b. now right-click on computer and select the printer to use onlineStep 2: Update printer drivers.
To install new or updated printer drivers to update
http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/print_drivers_install_updatew.mspx?mfr=true -
Dear all,
Do you have any suggestions on where we should put the opening of scope application code?
These codes should be used the first time user enter the app, but not every time when you navigate to a new page.
I use bbUI and currently trying to put it in the webworksready listener in my index.html
Is this supposed to be invoke only once or will be called each time when I refresh the screen using bb.pushScreen?
I noticed it was triggerred several times, so this isn't what I want to achieve.
Any other event listener could I use to put my 'field of Application only once by opening start?
Appreciate for any suggestion or comment.
This happens in fact because of the bug of the ripple, this ready recall webworks has been triggerred twice.
So ideally, it won't be a problem.
-
need to make space on my pc for re - org hard disk and a user folder size is 14.3 GB
I guess that this computer has never been maintained. Of course, you must delete the files in the Temp directory. You can use CCleaner to clean up, but cannot use cleaning tools. Do not use Registry tools.
http://www.elephantboycomputers.com/page2.html#maintenance MS - MVP - Elephant Boy computers - don't panic!
-
Having had many problems with Vista had it restored to factory settings by an engineer during the summer and all went well for 6 weeks. Now since all received updates is wrong again! System Restore tried but still can't remove photos, a dialog box appears and says that it recycling but nothing happens. Also lost sound through the built-in speakers, but can still hear through headphones. Can access Internet e-mail project but a second display shows the dialog box 'yet another instance of the works' log off windows, and then restart windows Messaging. Help needed please! Thank you
Do the Vista repair facility:
http://www.Vistax64.com/tutorials/88236-repair-install-Vista.htmlScan for malware on the computer by installing Malwarebytes:
http://download.CNET.com/Malwarebytes-anti-malware/3000-8022_4-10804572.html -
Firefox is showing twice in the Task Manager. It is launched only once.
I have reset firefox the other day and this is what seems to have started. I checked for viruses and malware, but my computer is clean. More computer stays under, more the two processes seem to get.
Hi Greg181, firefox has begun to move toward an architecture multiprocessue recently - separating web content browser, so it is normal that you see several process firefox.exe running. https://blog.Mozilla.org/futurereleases/2016/08/02/whats-next-for-multi-process-Firefox/
-
How can I make the music in this piece of file only once?
What action/script writing to only stop music loop?
http://SI-J0.deviantart.com/art/test-207985026
IM using AS2. Im a bit new to Flash can so please explain thoroghly. Thank you.
Hi, Itz fixed. Once you got the file! Please mark the thread as solved.
-
User interface - change time idle disconnect user
HI -.
I want to change default user logout idle time in the user interface. Found this article: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 2015135
But I don't understand where the login to change this?
I have to PuTTY UI VM and VM Analytics, but none of the folders like the one mentioned KB is here.
It is said to connect on the VAPP? I miss something here?
Type r
Björn.
Hi Bjorn,
You can use PuTTY or WinSCP to connect to the virtual machine to the user interface of vApp.
I just checked in my environment (via WinSCP because it is easier to go through the files and modify the files) and I have the existing folder: / usr/lib/vmware-vcops/tomcat/webapps/vcops-vsphere/WEB-INF.
You use what version of vCOps?
My advice is:
(1) use WinSCP
(2) let us know at what point the path is missing: example: after tomcat / or after/vcops-vsphere?
(3) post a screenshot with the structure of folders in WinSCP, so we can think of other suggestions.
Hope this helps,
Alex D.
-
Time of the effects display after: How do I change back to colons of semicolons?
Don't know how the switch occurred in the first place, but I couldn't find any info regarding the definition of the punctuation characters used in the time display. Obviously not stop working on anything, but there is something so annoying to see these semicolons here instead of semicolons. Thanks for any help!
It is important to understand that the difference between gout and timecode frame non‑drop frame is in the accuracy of the time displayed. Drop time frame displayed in real time in hours minutes and seconds, while the non‑drop frame timecode does not work. If you create projects for broadcast, including advertising messages, you must use drop frame time so that the length of your program is accurate real-time code. length is correct in real time. The total number of images remains unchanged, only the accuracy of the time display.
-
Some subjects appear twice in the list of topics, but each exists only once in the project files. What are the causes for this and what can do to prevent it? I am using HR 11.0.4.291. I deleted the CPD file.
Here is an example:
Change in all files in a folder specific to say the first element. There may be two files in the same folder that Windows does not allow that. My guess is that the duplicates are in different folders and change the folder will help you find the original and the duplicate.
Also open both the list of topics. Should be the red squares in it? If Yes, you have sort of a release in the source.
Post back with what you find.
See www.grainge.org for creating tips and RoboHelp
-
Must have an e-mail virus, my Outlook send at least 10 people on my contact list a unsolicited to email that I got relative to earn money in your spare time in the United States. How do is stop what's happening, I have anti virus and anti spyware programs but this is not enough!original title: e-mail viruses?
The part that you do not know how?
-
I know that if I compose an email from test to myself, while working offline and then send it some time later, when he gets back with me the time indicated is time, he entered my Outbox no time, it has been sent.
I would like to know what time on an incoming third party e-mail represents.
Is this time what was typed to the sender of the Outbox. the actual sending time; the time of arrival at my ISP server or other time?
I would like to know because I am trying to settle a dispute on the time shown on a couple of emails.I think you need to spend time in the headers of an email.
Time is created when the composer creates the mail. If you want the dates and times of things like arrival at the level of the different sections on the transmission headers to have this information.
CTRL + u indicates the source of the message.
-
80% of the time, emails can be sent?
I send only less than 10 emails per day on my pc at home. 80% of the time, emails cannot be sent because the server of hotmail says that he is busy and to try again later. It is even difficult to register the email project, the system responds that the server is busy.Hello Charles MEdgar,.
The best place to ask your question of Windows Live is inside Windows Live help forums. Experts specialize in all things, Windows Live, and would be delighted to help you with your questions. Please choose a product below to be redirected to the appropriate community:
Looking for a different product to Windows Live? Visit the home page Windows Live Help for the complete list of Windows Live forums to www.windowslivehelp.com.
Maybe you are looking for
-
I use the workspace of godaddy.com. Apparently, there is a setting that is biased since I can't compose an email on this particular computer. Everything works fine on my laptop and iphone. Once I click on to reply or compose an email, once the signat
-
I recently bought a macbook pro. Do I need to have an antivirus?
I recently bought a macbook pro. Do I need to have an antivirus?
-
HelloHow can I disable Windows Update?THX
-
Message: The remote procedure call failed and did not execute.
Every once in a while when I use the computer, it will completely disconnect from the internet and when I try to open Windows Explorer, I get this message (see image). He cannot do anything with the computer except save if I have a file open. A few m
-
Original title: AutoCad R14 to run on Windows Vista or Windows 7 How can I get AutoCad R14 to run on Windows Vista or Windows 7, I can't install on a Vista Machine or a Windows 7 system, it starts up and seems to settle and then it just stops.Please