Cannot send email notification to more than one people

Hi everyone,
Hope anyone could help me to solve this. I want to send email notification to two people. First to the staff to alert him that his claim is ready. And also to his supervisor that the claim has been disbursed. Below is the PL/SQL procedure, check_claim being used..
CREATE OR REPLACE PROCEDURE TEST.check_claim AS
NO number;
CURSOR emp_cur is
select * from emp where dept=7 and status='active';
emp_rec emp_cur%rowtype;
email_to varchar2(200);
default_email varchar2(200);
mesg varchar2(4000);
subj varchar2(4000);
crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
BEGIN
default_email:='@phantom.com';
FOR emp_rec in emp_cur
LOOP
if emp_rec.claim_status ='Y' then
email_to:=emp_rec.staff_id||default_email;
subj:='Claim No'||emp_rec.claim_id;
mesg:='Your claim has been disbursed. Please check.';
email_to:=emp_rec.staff_hod||default_email;
subj:='Claim'||emp_rec.claim_id;
mesg:='Claim No'||emp_rec.claim_id||' has been disbursed';
e_mail_message(email_to,email_to,subj,mesg);
e_mail_message(email_to,email_to,subj,mesg);
end if;
END LOOP;
END;
The first email_to is to be sent to staff_id and the second email_to is to be sent to staff_hod.
The PL/SQL procedure then called the e_mail_message procedure shown below for the connection information..
CREATE OR REPLACE procedure
TEST.e_mail_message
from_name in varchar2,
to_name in varchar2,
subject in varchar2,
message in varchar2
is
l_mailhost VARCHAR2(64);
l_from VARCHAR2(64);
l_to VARCHAR2(64);
crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
l_mail_conn UTL_SMTP.connection;
mesg VARCHAR2( 4000 );
BEGIN
select a.SERVER into l_mailhost from email_setting a where a.SERVER is not null;
select a.USERNAME into l_from from email_setting a where a.SERVER is not null;
--UTL_SMTP.open_data(l_mail_conn);
mesg:= 'Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || crlf ||
'From: <'||l_from||'>' || crlf ||
'Subject: ' ||subject|| crlf ||
'To: '||to_name || crlf || '' || crlf ;
mesg:=mesg||message;
l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 25);
UTL_SMTP.helo(l_mail_conn, l_mailhost);
UTL_SMTP.mail(l_mail_conn, l_from);
UTL_SMTP.rcpt(l_mail_conn, to_name);
UTL_SMTP.data(l_mail_conn, mesg);
UTL_SMTP.quit(l_mail_conn);
END;
However, the email notification only being sent to the supervisor / head of department. The staff concerned does not receive any email notification. Please help. Thank you for your time...

from wht i see
email_to:=emp_rec.staff_id||default_email;
subj:='Claim No'||emp_rec.claim_id;
mesg:='Your claim has been disbursed. Please check.';
email_to:=emp_rec.staff_hod||default_email;  -- wrongit should be
email_to:=emp_rec.staff_id||default_email;
subj:='Claim No'||emp_rec.claim_id;
mesg:='Your claim has been disbursed. Please check.';
email_to:= email_to || ' , ' ||  emp_rec.staff_hod||default_email;

Similar Messages

  • Can I use the same email address in more than one community? How?

    Can I use the same email address in more than one community? How?

    Yes, you can be a member of multiple communities under the same email address. You will need to be invited to those communities. If you are trying to create new communities under the same address, you will not be able to do that through our website.

  • I downloaded Adobe Acrobat X in 2010 and then a few years later I got a new computer and I would like to install the Adobe Acrobat X on my new computer but I cannot tell if I had more than one license and my Adobe account is not showing that I ever downlo

    I downloaded Adobe Acrobat X in 2010 and then a few years later I got a new computer and I would like to install the Adobe Acrobat X on my new computer but I cannot tell if I had more than one license and my Adobe account is not showing that I ever downloaded or ordered anything.  Can you assist?

    Download/install it from http://helpx.adobe.com/acrobat/kb/acrobat-downloads.html and activate it with your serial number.

  • Stmfadm A host group member cannot be a member of more than one host group

    Hello, i setup solaris & make it FC target for my test ESX cluster.
    ESXi nodes has not local disk (to boot from), so on solaris side I setup 3 zvol and try to export them to my ESXi host. 1 & 2 zvol to setup ESXi it self & boot from it.
    3-d zvol to datastore purposes, store & run virtual machine.
    But I have problem with lun masking.
    I need following config:
    ESXi1 - Lun 1,3
    ESXi2 - Lun 2,3
    I plan create 3 host-groups:
    1 - ESXi1
    2 - ESXi2
    3 - ESXi1,ESXi2
    But it is imposible, it seems there is limit in stmfadm
    In manual page I can see: "A host group member cannot be a member of more than one host group."
    Can you advice me any solution?
    Alex
    Edited by: 1009729 on Jun 4, 2013 9:18 PM

    Hello, i setup solaris & make it FC target for my test ESX cluster.
    ESXi nodes has not local disk (to boot from), so on solaris side I setup 3 zvol and try to export them to my ESXi host. 1 & 2 zvol to setup ESXi it self & boot from it.
    3-d zvol to datastore purposes, store & run virtual machine.
    But I have problem with lun masking.
    I need following config:
    ESXi1 - Lun 1,3
    ESXi2 - Lun 2,3
    I plan create 3 host-groups:
    1 - ESXi1
    2 - ESXi2
    3 - ESXi1,ESXi2
    But it is imposible, it seems there is limit in stmfadm
    In manual page I can see: "A host group member cannot be a member of more than one host group."
    Can you advice me any solution?
    Alex
    Edited by: 1009729 on Jun 4, 2013 9:18 PM

  • Outlook (ex Hotmail) on iPhone refuses to send e-mail to more than one person

    Hi,
    I have two questions today...
    When I try to send an e-mail to more than one person from my @outlook.com address on my iPhone it fails everytime and a message pops up that it could not connect to the server. Sending e-mails to one person at a time works perfectly. I think this is a Microsoft issue as I had to verify that I was "human" before I could send a test e-mail to more than one person while logged into the Outlook website on my PC. I never had problems like this on my old Gmail and Ymail accounts. Any ideas how to fix this?
    Alternatively, I can use my @icloud.com e-mail address, but this leads to my second question. Apple states that I cannot use my iCloud e-mail address as my Apple ID. I do however not want to keep two mailboxes. Can any e-mails Apple send me (eg. receipts for purchases, etc) be sent to my iCloud address? I'll can then just keep the other e-mail address just for the Apple ID but do not have to monitor it. It this can be done please advise where I can change this.
    Any advice will be greatly appreciated.

    Some style rules that Firefox handles well on the screen can cause this problem. Many email sites have a print button which simplifies the message format and removes navigation elements, etc., and Firefox generally handles print-formatted pages better. If your email site doesn't have print-formatted pages or those do not print, a "hack" is to select the text you want to print and then choose the Selection option in the print dialog.
    To hide email addresses from recipients, you need to place them in the BCC field. What do you put in the TO field in that case? You can use your own address.

  • Applescript: Sending a mail to more than one person

    I have a script tp send a message that the server has started in the morning to people.
    How can I get it to send it to more than one person?
    I use
    *set mailto_addr to [email protected]*
    how do I ad people to it?
    Thanks

    I saw that but do not know how to incorporate it.
    Either use a repeat loop:
      set recipient_list to {{name:"a", address:"[email protected]"}, {name:"b", address:"[email protected]"}, {name:"c", address:"[email protected]"}}
      set newMessage to (make new outgoing message with properties {subject:"The Subject", content:"your message here", visible:true})
      tell newMessage
        repeat with eachRecipient in recipient_list
          make new recipient at end of to recipients with properties {name:eachRecipient's name, address:eachRecipient's address}
        end repeat
      end tell
    Or add them individually:
      set newMessage to (make new outgoing message with properties {subject:"The Subject", content:"your message here", visible:true})
      tell newMessage
        make new recipient at end of to recipients with properties {name:"a", address:"[email protected]"}
        make new recipient at end of to recipients with properties {name:"b", address:"[email protected]"}
        make new recipient at end of to recipients with properties {name:"c", address:"[email protected]"}
      end tell

  • Sending text msgs to more than one person

    OK, I realize I'm probably just a doofus who can't figure this out, but how do you send a text message to more than one person on the iphone? I swear I've looked everywhere. Help, please? Thanks!

    You will need to use the email feature of the iPhone to do this.
    To send Apple feedback: http://apple.com/feedback

  • Cannot Send Email Notification Using Stored Procedure.

    Hi Friends,
    I tried to execute this job scheduler...
    begin
    dbms_scheduler.create_job(
    job_name => 'ILMS_JOB_SCHEDULE'
    ,job_type => 'PLSQL_BLOCK'
    ,job_action => 'begin ilms.check_reminder(); end; '
    ,start_date => SYSTIMESTAMP
    ,repeat_interval => 'FREQ=DAILY'
    ,enabled => TRUE
         ,end_date => NULL
    ,comments => 'Ilms job schedule for notification.');
    end;
    However, since the effect is too long I rescheduled the frequency to be every one minute in this set attribute...
    BEGIN
    DBMS_SCHEDULER.SET_ATTRIBUTE(
              name => 'ILMS_JOB_SCHEDULE'
              ,attribute => 'repeat_interval'
              ,value => 'FREQ=MINUTELY;INTERVAL=1'
    DBMS_SCHEDULER.DISABLE('ILMS_JOB_SCHEDULE');
    DBMS_SCHEDULER.ENABLE('ILMS_JOB_SCHEDULE');
    END;
    Check Reminder is the stored procedure invoked by job scheduler to check values in database columns before sending email notification to the respective recipients' email address and also the format of the email notification to be sent to the recipients...
    CREATE OR REPLACE PROCEDURE check_reminder AS
    NO number;
    CURSOR emp_cur is
    select * from pergerakan_ks where TASK_FLAG=7 and TASK_STATUS='InProgress';
    emp_rec emp_cur%rowtype;
    email_to varchar2(200);
    default_email varchar2(200);
    mesg varchar2(4000);
    no_kes varchar2(100);
    subj varchar2(4000);
    kpi number;
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    BEGIN
    default_email:='@abc.com.my';
    FOR emp_rec in emp_cur
    LOOP
    if emp_rec.PKS_TKH_TERIMA is null then
    dbms_output.put_line('count day ' || round(sysdate - to_date(emp_rec.pks_tkh_hantar)) || crlf || crlf);
    if round(sysdate - to_date(emp_rec.pks_tkh_hantar)) >3 then
    email_to:=emp_rec.pks_penghantar_id||default_email;
    select b.KS_BIL_NO into no_kes from kertas_siasatan b where b.KS_ID = emp_rec.pks_ks_id;
    subj:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    mesg:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    dbms_output.put_line('update old pergerakan pks_id : '||emp_rec.pks_id);
    update pergerakan_ks set task_status='Done' where pks_id=emp_rec.pks_id;
    dbms_output.put_line('insert new pergerakan ks : ');
    insert into pergerakan_ks(pks_id,pks_ks_id,pks_km_id,pks_penghantar_id,pks_tkh_hantar,
    pks_penerima_id,pks_tkh_terima,task_name,task_owner,task_status,task_flag,fb_id)
    values(pks_id_seq.nextval,emp_rec.pks_ks_id,emp_rec.pks_km_id,
    emp_rec.pks_penghantar_id,sysdate,
    null,
    null,emp_rec.task_name,
    emp_rec.pks_penghantar_id,
    'InProgress',6,emp_rec.fb_id);
    commit;
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    end if;
    if emp_rec.PKS_TKH_TERIMA is not null then
    dbms_output.put_line('emp_rec.pks_km_id ' || emp_rec.pks_km_id || crlf);
    select c.KM_KPI into kpi from keluar_masuk_ks c where c.KM_ID = emp_rec.pks_km_id;
    no := round(sysdate - to_date(emp_rec.pks_tkh_terima))-kpi;
    dbms_output.put_line('count day - kpi' || no || crlf);
    dbms_output.put_line('kpi ' || kpi || crlf);
    if no = 1 then
    email_to:=emp_rec.pks_penghantar_id||default_email;
    select b.KS_BIL_NO into no_kes from kertas_siasatan b where b.KS_ID = emp_rec.pks_ks_id;
    subj:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    mesg:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    email_to:=emp_rec.task_owner||default_email;
    subj:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    mesg:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    if no = 3 then
    select b.KS_BIL_NO into no_kes from kertas_siasatan b where b.KS_ID = emp_rec.pks_ks_id;
    email_to:=emp_rec.task_owner||default_email;
    subj:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    mesg:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    end if;
    END LOOP;
    END;
    E_mail_message is the stored procedure invoked by the check_reminder to tell scheduler information of the connection and the email address of the recipients...
    CREATE OR REPLACE procedure
    e_mail_message
    from_name in varchar2,
    to_name in varchar2,
    subject in varchar2,
    message in varchar2
    is
    l_mailhost VARCHAR2(64);
    l_from VARCHAR2(64);
    l_to VARCHAR2(64);
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    l_mail_conn UTL_SMTP.connection;
    mesg VARCHAR2( 4000 );
    BEGIN
    select a.SERVER into l_mailhost from email_setting a where a.SERVER is not null;
    select a.USERNAME into l_from from email_setting a where a.SERVER is not null;
    --UTL_SMTP.open_data(l_mail_conn);
    mesg:= 'Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || crlf ||
    'From: <'||l_from||'>' || crlf ||
    'Subject: ' ||subject|| crlf ||
    'To: '||to_name || crlf || '' || crlf ;
    mesg:=mesg||message;
    l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 25);
    UTL_SMTP.helo(l_mail_conn, l_mailhost);
    UTL_SMTP.mail(l_mail_conn, l_from);
    UTL_SMTP.rcpt(l_mail_conn, to_name);
    UTL_SMTP.data(l_mail_conn, mesg);
    UTL_SMTP.quit(l_mail_conn);
    END;
    I tried to execute to execute the e_mail_message procedure but received this error. Also, no notification sent to the email address...
    ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 99
    ORA-06512: at "SYS.UTL_SMTP", line 241
    ORA-06512: at "ILMS.E_MAIL_MESSAGE", line 33
    ORA-06512: at line 13
    Please help so that I can receive the email notification into my email...thanks in advance for your time..

    user13281540 wrote:
    ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 99
    ORA-06512: at "SYS.UTL_SMTP", line 241
    ORA-06512: at "ILMS.E_MAIL_MESSAGE", line 33
    ORA-06512: at line 13This is not an Oracle error - this is the mail server saying "+hey, I don't like that e-mail address you are supplying, I'm not accepting it!+".
    If you look at RFC821 (Request For Comments memo 821 describes the SMTP specifications), you'll see that the sender and recipient needs to be supplied in the format +<[email protected]>+, e.g. +<[email protected]>+.
    I have found that not all SMTP servers are equal in this regard. Some may insist on the brackets around the address, some may not.
    You need to confirm the format of the addresses you use in the "+MAIL FROM+" and "+RCPT TO+" commands.. and ensure that these formats are accepted by your SMTP server - and if not, change your code to use an acceptable format.
    The easiest way to do this is using telnet - and interacting directly and manually with the server. SMTP is a clear text protocol and easy to use manually. Try it. It is the best way to test SMTP interaction and validate the approach and SMTP commands and arguments used by your code.

  • Cannot burn a playlist over more than one CD

    I have developed the following problem:
    If I try to burn a playlist which requires more than one CD, I get the usual message asking me if I want to burn on more than one audio CD to which I reply yes. Once the first CD is finished I get the message to insert another CD which then proceeds to burn the songs already burned on the first CD instead of moving on to the next batch!
    Also sometimes the song names etc are included on the burned CD but usually they are not.
    Is this a problem particular to me or is it an iTunes 8 gift?
    I have repaired permissions and this makes no difference.

    patience, patience. You have to remember that no one gets paid here. We're all volunteers. Your question probably just slipped through the cracks.
    OK
    Yes you can use multiple drives. I do it all the time. I usually have one drive dedicated as my Capture drive where I keep all of my captued footage and then other drives for all of the other stuff, ie graphics, music, etc...

  • How come its not letting me video chat with more than one people?

    i've chatted before with more than 2 people on ichat but for some reason its not letting me. The plus sign will only show like 2 names meanwhile there are other people on my buddy list that i want to add not the ones in the plus sign. I've exited out of the chat i had with one person and went to the other person to make sure theres is working and it does. so why can;t i chat with 3 people then, and how to add them. If someone can help that would be great! Thanks!

    Perthaps http://docs.info.apple.com/article.html?artnum=304486
    and http://docs.info.apple.com/article.html?artnum=301050
    play into this...
    (if this solves your problem, or is actually helpful towards arriving at a solution to your problem, please consider clicking on either the gold or green star in order to mark this reply as "helpful" or "solved")

  • Why can I not send a text to more than one person at a time on my iphone 5

    I have an iphone 5 IOS 8.1.3, and I can only send text messages to one person at a time. I cannot send GROUP text messages. It will then tell me they are not delivered.  What is wrong? How can I correct it?

    Send a group message with your iPhone, iPad, or iPod touch - Apple Support
    Send messages with your iPhone, iPad, or iPod touch - Apple Support
    If you can't send or receive messages on your iPhone, iPad, or iPod touch - Apple Support

  • Can email be erased more than one at a time on my iPad?

    I want to know if email can be erased more than on at a time on my iPad?

    Yes, go to the folder and then Edit in top right, select the emails for deletion and follow the prompts from the bottom left.

  • How do I send, or bcc to more than one person at a time?

    I have used outlook express for years and grown very familiar with it. I switched to Thunderbird because of mail problems in WIN7. I have no problem receiving, or sending to one person. The email autofills the name of the first person, but when I try to type another name, the first is deleted. This is the same on TO: or BCC. Also, is there a way to avoid having to click on the field "show remote content" on every message.
    Thanks for any assistance.
    Norman

    I missed your 2nd question.
    This article explains how to always show remote content and the risks of doing so. You can make that call. Adding your trusted senders to your address book will allow content from them and is the recommended action.
    http://kb.mozillazine.org/Privacy_basics_(Thunderbird)

  • Problem in sending email with attachment more than 32kb through utl_mail

    Hi friends
    I am able to send an email with attachment upto 32kb using utl_mail.
    But whenever I increase the size of attachment from 32kb, it prompts me an error.
    ===============================================
    ORA-20001: The following error has occured:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ===============================================
    i have also used LONG RAW instead of RAW, bu still the problem is same.
    please help me in solving this issue.
    Thanks in advance,
    Ankur

    Yeah that's an issue with UTL_MAIL it only has 3 procedures, and none of them let you send data to the SMTP server incrementally. To send files larger than 32k you will need to switch over to using UTL_SMTP directly or via a helper package such as the [DEMO_MAIL package|http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html] available from otn.

  • Sending text to more than one people at a time

    Hello
    I have a problem when I go to text someone. I sent out a text today to a bunch of people, I think like 8 people. I went through my contacts and added them to the recipients of my message. It sends the message out as a picture message for some reason (this is what my friends have told me). Is there anyway to stop that?
    Also once my friends go to respond to the message their response goes to all of the other people that I texted on top of me. Why does my phone do that?
    Please let me know what I can do and if you need more details on my issue.
    Thanks

    The iPhone4 by default, sends messages addressed to multiple recipients as MMS messages. When a message is addressed to multiple recipients, the message will be sent via MMS and the iPhone header will display, "New Group MMS".
    If you do not want the recipients to be able to "reply to all" you need to disable this function on your phone. Below I have provided the steps.
    From the home screen, select Settings.
    Select Messages.
    From Group Messaging, drag the switch left or right to enable / disable.
    Enabled when set to ON.
    ON
    Multi-recipient text messages will be converted to MMS messages. Recipients of these group messages with capable devices will be able to see all of the message recipients and "reply all".
    OFF
    Multi-recipient text messages will be sent as SMS messages. Message recipients will not be able to "reply all" nor will they be able to see a list of the message recipients.
    Hope this helps, please feel free to contact us back if you need more assistance.
    John B

Maybe you are looking for

  • Mac book pro Users & Groups deleting problems

    I have a Macbook Pro, i believe its a 2008 15 inch, thats just come back from the repair shop. I added another user (through Users and Groups) changed the settings so that person was the admin and deleted the original user. Now after roughly an hour

  • Can't open iTunes 7.5??

    I recently downloaded itunes 7.5 and now when I attempt to open itunes I get a message saying "iTunes requires Mac OS X 10.4.7 or later. For more information on upgrading your computer visit www.apple.com/macosx." I don't want to upgrade and now I ca

  • Regarding activation error

    hai friends when i am activating datasource in rsa5 i am getting error message as invalid call sequence for interfaces when recording changes,could you please suggest me hot to soleve this.

  • No infrared at all?

    I can't seem to use my Apple Remote with my MacBook Pro. I thought the battery in the remote might be dead, so I replaced it, but it still doesn't work. I've read that I should try unpairing the Remote (it was paired) and then re-pairing. Unfortunate

  • Preload extern swf results in weid behavior. It this normal?

    Hello, I tried to load an external swf file. In this swf file i have an embeded movie so that i see the preloader in action. What happens is, that while preloading i hear the movie playing in the background. So when the external swf is at for example