Schedular Job Email Notification

I have used the directions from the following link to set up email notifications.  When I execute the job I don't receive any email?  I have setup the email in OEM under Setup => Notification Methods and tested it successfully.  I've also setup my email address in OEM under preferences  and tested successfully as well.  What am I missing?
I've determined that it's privileges, as I've set the exact same thing up under a sys admin user and it works fine.  What privileges do I need?
Thanks,
Mark

I entry in the dba_subscr_registrations;
SUBSCRIPTION_NAME is "SYS".SCHEDULER$_EVENT_QUEUE":SCHED$_AGT$99;
Do you need other fields?
40 entries in the sys.AQ$SCHEDULER$_EVENT_QTAB and I am not able to cut and paste due to work restrictions, but here are a few of the lines.
AQ$SCHEDULER$_EVENT_QTAB_E  EXPIRED        27-MAR-14 16.57.06  SYS     (null)  SYS  JOB_SUCCEEDED  WL  MISS_P_PROC  27-MAR-14 04.57.06
AQ$SCHEDULER$_EVENT_QTAB_E  EXPIRED        27-MAR-14 16.52.57  SYS     (null)  SYS  JOB_SUCCEEDED  WL  MISS_P_PROC  27-MAR-14 04.52.57
AQ$SCHEDULER$_EVENT_QTAB_E  UNDELIVERABLE  27-MAR-14 16.50.09  SYS     (null)  SYS  JOB_SUCCEEDED  WL  MISS_P_PROC  27-MAR-14 04.50.09
AQ$SCHEDULER$_EVENT_QTAB_E  UNDELIVERABLE  27-MAR-14 16.48.00  (null)  (null)  SYS  JOB_STARTED    WL  MISS_P_PROC  27-MAR-14 04.48.00
AQ$SCHEDULER$_EVENT_QTAB_E  UNDELIVERABLE  27-MAR-14 16.35.06  SYS     (null)  SYS  JOB_SUCCEEDED  WL  MISS_P_PROC  27-MAR-14 04.35.06
AQ$SCHEDULER$_EVENT_QTAB_E  UNDELIVERABLE  27-MAR-14 16.33.00  (null)  (null)  SYS  JOB_STARTED    WL  MISS_P_PROC  27-MAR-14 04.33.00
AQ$SCHEDULER$_EVENT_QTAB_E  UNDELIVERABLE  27-MAR-14 16.27.06  SYS     (null)  SYS  JOB_SUCCEEDED  WL  MISS_P_PROC  27-MAR-14 04.35.27
AQ$SCHEDULER$_EVENT_QTAB_E  UNDELIVERABLE  27-MAR-14 16.23.44  SYS     (null)  SYS  JOB_FAILED     WL  MISS_P_PROC  27-MAR-14 04.23.44

Similar Messages

  • EM DB control, backup jobs email notification

    Hello all,
    I have some 10.2 databases and I schedule the backup jobs through Enterprise Manager Db Control.
    Is it possible to receive email notifications about the job executions?
    I've configured the email notification in Enterprise Manager DB Control and I receive the "test email", but I don't receive any other emails from EM.
    Thank you.
    Bye,
    Andrea

    Andrea,
    You need to create your own emailing stored procedure using utl_smtp package.
    Then you can make a call to this procedure after your jobs completion, using chained jobs for example.
    Marco

  • Email Notification after the backup job is complete

    I have the email working and it sends email after the differential and full backup is complete but I have added the logfile backup but it does not append to the same email. I did not write all the steps when I configured 1st time and I am screwed now. I
    have the database mail setup. Is that enough to send email after the job is complete. I want to email to read the path of the backup. I have done restart of the sql aAgent too but no luck. I have followed instruction on the following
    http://www.kodyaz.com/articles/sql2005-database-mail.aspx
    http://www.howtogeek.com/howto/database/sending-automated-job-email-notifications-in-sql-server-with-smtp/
    http://www.databasejournal.com/features/mssql/article.php/3626056/Database-Mail-in-SQL-Server-2005.htm

    Did you select "Enable Mail Profile" in SQL Server Agent properties? More details
    here
    Pradeep Adiga
    Blog: sqldbadiaries.com

  • DBMS_SCHEDULER send email notification issue

    Hello,
    We have a database Oracle Database 11g Release 11.2.0.4.0 - 64bit Production running on Windows 2008 server r2. We have 3 schemas. We have the exact same jobs on each schema. 2 of the schemas send the email notifications correctly. One simply doesnt!!! We have checked pretty much everything, Grants etc and everything seems to be the same.
    Does anyone have any ideas how to resolve this.
    Thanks!

    Hi,
    Are you talking about the ADD_JOB_EMAIL_NOTIFICATION procedure? If yes, take a look at this thread to see if it helps:
    Schedular Job Email Notification

  • Multiple email notification for scheduled web intelligence jobs

    Hi,
    Webi job failed email notification for daily scheduled jobs, email count goes more than 2000.
    Operating System Details:
    Windows 2008 R2
    SAP Business Objects Details:
    SAP BO 4.0 SP6
    Database Details:
    CMS DB Oracle 11.2.1.0
    Issue description:
    On daily basis 100 jobs are scheduled using event file. All 100 jobs start after BW data load completion.
    Below is the process for webi job schedule start.
    1) BW job complete
    2) Event file update on shared location 
    3) Webi job scheduling starts.
    Till april 1st week all 100 jobs were scheduled succesfully  and we recieved 101 notification, 1 extra mail for event file notification. 
    But from last week we recieved more than 2000 mail and on subsequent retry all jobs were scheduled succesfully.
    We check the CUID in query builder, but only data for 16 jobs was available, and in instance manager we got 300 failed instances of 16 jobs, but those jobs were executed successfully after multiple reattempt.
    Below is the error mentioned in instance manger for all 300 instances:
    "Object could not be scheduled within the specified time interval".
    Note : Due to unavailablity of trace log, we cannot enable the trace log in enviornment.
    Thanks,
    Vizit Yadav

    Hi Vijay,
    Thanks for reply.
    I have read the KB#144881- Multiple instances spawned after daylight savings time change.
    Though this issue arrived after daylight saving, i have few more points to describe:
    1. Issue arrives only on Monday, not on every day.
    2. Day light saving was on 29th March, after that at the very first Monday on 30th March issue was not       there, however after that issue arrives every Monday, i.e. 6th & 13th of April.
    Is there any SAP notes for SAP-BO 4.0 SP 6 on this.
    Regards,
    Vizit

  • Email Notification after Job run

    Hi everybody,
    I want to setup an email notification at the end of a job run.
    The job is an update run from our Activate Directory and checks if there are some changes to do.
    At the end or after this job I would like to send an email to the admin that the job successfully run and what the job did.
    How could I setup this?
    At the moment I tried to use a SQL statement to table MC_LOGS within a script called in the last pass of the job.
    But I only get the information what to job do from the last run of the job and not from the current run.
    Best regards & a happy new year, Anja

    Hi Anja
    Your last pass can only fetch information from the last run and not the current one because the Job is still running and the respective log is not yet written to the table.
    But maybe you could use the LogFile created then the Job finishes.
    I suppose you use the "LDAP (ADS) - Update All"- Job for LDAP-to-IC updates. This job writes a logfile to %$ddm.ddmpath% which you could send as mail attachment. Use the UpdateJob-"Event scheduling" button to run your SendMail-Job after every UpdateJob-completion.
    Another idea would be to use the SQL-View MCMV_JOBLOG which I think is the datasource of IC-JobLog. I suppose column "mcmv_data" stores the details.
    Hope I could help.
    BR
    Michael

  • Oracle Scheduling Sending Email Notifications of Job Errors

    Hi,
    We are Oracle E-Business Suite - 12.1.3 & DB 11gr1
    I want to send to configure - Oracle Scheduling Sending Email Notifications of Job Errors.
    I already created job.. how i can configure Email Notifications of Job Errors.
    Thanks
    KSV.DBA

    Duplicate posts?
    Email Notofication - scheduled job fails
    Email Notification - Oracle Scheduled job failed
    Scheduler - 11g
    Re: Create Job scheduler

  • Some OEM jobs do not send an email notification

    Hi!
    In a job summary I have the following:
    ===============
    Status Succeeded
    Scheduled 03-Aug-2010 04:00:00 CEST
    Repeating Weekly on Monday, Tuesday, Thursday, Friday, Saturday
    beginning 29-Jul-2010 04:00:00
    Central European Summer Time (GMT +2:00)
    Started 03-Aug-2010 04:00:01 CEST
    Ended 03-Aug-2010 04:00:26 CEST
    Elapsed Time 25 seconds
    Notification Yes
    ===============
    In an other job summary I have the same as above but with Notification NO. How do I change this to YES?
    Both jobs have the same notification configuration (send emails on succeding and when problems occur):
    ========================
    E-Mail Notification for Owner
    A Notification rule may be used by any Administrator to receive notifications about this job. The owner may choose to receive e-mail notifications based on any of the selected status values below. E-mail will be sent based on the Owner's notification schedule.
    Scheduled Running Suspended Succeeded Problems Action Required
    ===================
    Thanks
    Markus

    Hi Rob!
    Thanks for your reply but if I would need a notification rule why did I receive the notification for the first job???
    As the owner of the job (SYSMAN) I have configured the following directly in the job:
    =====
    A Notification rule may be used by any Administrator to receive notifications about this job. The owner may choose to receive e-mail notifications based on any of the selected status values below. E-mail will be sent based on the Owner's notification schedule.
    Scheduled Running Suspended Succeeded Problems Action Required
    =====
    The notification schedule is defined from 0 to 24 o'clock for sysman.
    Thanks
    Markus

  • Email notification using Oracle Job

    Hi,
    I am trying to setup a email notification job using Oracle 11gR2. Per online documnetation I have done the following setup, but the email notification job is failing. If you guys have any ideas, please assist.
    Step 1:
    BEGIN
      DBMS_SCHEDULER.set_scheduler_attribute('email_server', 'oracle.kotaise.com:25');
      DBMS_SCHEDULER.set_scheduler_attribute('email_sender', '[email protected]');
    END;
    Step2:
    BEGIN
      DBMS_SCHEDULER.create_job (
        job_name        => 'email_notification_job',
        job_type        => 'PLSQL_BLOCK',
        job_action      => 'BEGIN NULL; END;',
        start_date      => SYSTIMESTAMP,
        repeat_interval => 'freq=minutely; bysecond=0',   
        enabled         => TRUE);
    END;
    Step 3:
    BEGIN
    DBMS_SCHEDULER.ADD_JOB_EMAIL_NOTIFICATION (
      job_name   =>  'email_notification_job',
      recipients =>  '[email protected]',
      sender     =>  '[email protected]',
      subject    =>  'Scheduler Job Notification-%job_owner%.%job_name%-%event_type%',
      body       =>   '%event_type% occurred at %event_timestamp%. %error_message%',
      events     =>  'JOB_FAILED, JOB_BROKEN, JOB_DISABLED, JOB_SCH_LIM_REACHED');
    END;
    Step 4:
    I have created the following  job that executes a package which executes a package "test_package.pdata". This package is not created yet, becuase I wanted to see whether the email notification is working or not. As expected the "TEST_JOB" is failed becuase of missing package. But the email notification job "'email_notification_job'", which runs every minute, failed to send an email notification.
    BEGIN
      SYS.DBMS_SCHEDULER.CREATE_JOB
           job_name        => 'test_job'
          ,start_date      => SYSTIMESTAMP
          ,repeat_interval => 'freq=minutely; bysecond=0'
          ,end_date        => NULL
          ,job_class       => 'DEFAULT_JOB_CLASS'
          ,job_type        => 'PLSQL_BLOCK'
          ,job_action      => 'BEGIN test_package.pdata; END;'
          ,comments        => NULL
          ,enabled         => TRUE
    end;
    I have queried the DBA_SCHEDULER_NOTIFICATIONS table, and I see that the email notification job did not started.
    JOB_NAME                                      RECIPIENT                     EVENT
    EMAIL_NOTIFICATION_JOB      [email protected]      JOB_FAILED
    EMAIL_NOTIFICATION_JOB      [email protected]      JOB_BROKEN
    EMAIL_NOTIFICATION_JOB      [email protected]      JOB_SCH_LIM_REACHED
    EMAIL_NOTIFICATION_JOB      [email protected]      JOB_DISABLED
    Thanks

    Hi,
    The DBA_SCHEDULER_NOTIFICATIONS show the notification settings, not the notifications that were sent. To see that, run the follwoing query:
    select queue,
           msg_state,
           enq_time,
           enq_user_id,
           deq_time,
           deq_user_id,
           t.user_data.event_type,
           t.user_data.object_owner,
           t.user_data.object_name,
           t.user_data.event_timestamp
      from sys.AQ$SCHEDULER$_EVENT_QTAB t;
    Does it show anything for your job?

  • Email notification for GRID job output

    Is it possible to get the job output in the email notification? I can currently get the job status but not the output.

    it may be bit tricky to include in your email notifications, but its possible to trace back to GRID JOB output.
    1. Get job JOB execution ID
    2. Get Latest output_id from job execution ID.
    3. You can do a select from
    SELECT output FROM MGMT_JOB_OUTPUT WHERE output_id=&OUTPUT_ID
    its explained in metalink note
    Note 300690.1 - Troubleshooting Script for Problematic Job Output in EM 10g Grid Control

  • Email notification for failed Jobs

    Hello,
    We are using Oracle Database 10gR2 (10.2.0.2.0) on AIX 5.3
    How can I setup email notifications for Failed Jobs ?
    Here is what I did:
    1. Setup email and Test mail (working)
    2. Setup email address
    3. Create schedule for notification
    4. Create rule for Failed Job Count and select Send Email
    But when the job fails, I do not get the email
    I think I am missing something here.. Can you please help ?
    Thanks a lot :)

    Hi,
    Does up to the Below Three.. are they working properly..
    1. Setup email and Test mail (working)
    2. Setup email address
    3. Create schedule for notification (Does this working..try to test then go for next step)
    Coming to Step 4:-
    4. Create rule for Failed Job Count and select Send Email
    What do you mean by Failed Job Count .. ??
    what is the Logic you are following to find the latest Failed Job.??
    - Pavan Kumar N

  • EMAIL NOTIFICATION FOR DBMS_SCHDEULER JOB STATUS IN ORACLE 10G

    Hi All,
    I want to configure email notification for the job which is running through BUMS_SCHEDULER in oracle 10g
    Please provide the steps for configuration of the email notification.
    Thanks
    Mak

    Is your problem that you do not know how to send an email from Oracle 10g? If so then you use the UTL_MAIL package.
    Here's an example of calling it as part of a scheduler chain, not strictly what you're asking for but this lets you define success and failure steps and call each one based on the status of previous steps.
    BEGIN
    DBMS_SCHEDULER.CREATE_PROGRAM (
       program_name           =>'prg_Export_Success',
       program_type           =>'PLSQL_BLOCK',
       program_action         =>q'[BEGIN
                                    UTL_MAIL.SEND (
                                       sender      => 'who_its_from',
                                       recipients  => '[email protected]',
                                       subject     => 'subject line',
                                       message     => 'the message',
                                       mime_type   => 'text/plain; charset=us-ascii');
                                    END;]',
       number_of_arguments      => 0,
       enabled                  => TRUE,
       comments                 => 'Email success');
    end;
    BEGIN
    DBMS_SCHEDULER.DEFINE_CHAIN_STEP (
       chain_name      =>  'Export',
       step_name       =>  'stp_EXPORT_SUCCESS',
       program_name    =>  'PRG_EXPORT_SUCCESS');
    END;
    /... then define appropriate rules.

  • SharePoint Foundation 2013 installed on Windows Server 2012 not sending out email notification

    I have a server where i installed SP Foundation 2013 on top of Windows Server 2012. I have configured the SMTP as well as the outgoing SMTP in Central Administration
    of SharePoint. When i create an alert on a document library, its did not sent any email notification on the changes made to the document in the document library. So, i created a workflow to send out email using SPD2013. The workflow run, but it cannot sent
    out email with error saying that outgoing email is not configured correctly. I have checked with another server which i installed SP foundation 2013 on top of Windows Server 2008 R2 - its sending out email just fine using same configuration and outgoing SMTP.
    I need help to resolve this issue or at least the cause of the problem.
    Any help is greatly appreciated.

         
    Try below:
    http://social.technet.microsoft.com/wiki/contents/articles/13771.troubleshooting-steps-for-sharepoint-alert-email-does-not-go-out.aspx
    Go to Central Admin ---->Operations----->outgoing email settings and verify that SMTP server is mentioned correctly 
    2) Test the connectivity with the SMTP server.
    In order to do that follow these steps:
      Open  cmd
      telnet <SMTP server name> 25 ( We connect smtp server to the port 25)  
                     you should see a response  like this 220 <servername> Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at date and time
                     Beware that different servers will come up with different settings but you will get something
                     If you dont get anything then there could be 2 possible reasons, either port 25 is blocked or 
                     the smtp server is not responding.
      For testing response from your server
                       For testing response say ehlo to it.
                            Type :
                                        ehlo <servername>
                            output:
                                        250 <servername> Hello [IP Address]
      Now a test mail can be sent from that SharePoint server. 
                          Now we need to enter the From address of the mail.
                          Type :
                           mail from: [email protected]
                           output:
                           250 2.1.0 [email protected]….Sender OK
     It's time to enter the recepient email address.
    Type : rcpt to: [email protected]
    output:
    250 2.1.5 [email protected]
     Now we are left with the data of the email. i.e. subject and body.
    Type : data
    output:
    354 Start mail input; end with <CRLF>.<CRLF>
    Type:
    subject: this is a test mail
    Hi
    This is test mail body
    I am testing SMTP server.
    Hit Enter, then . and then Enter.
    output:
    250 2.6.0 <<servername>C8wSA00000006@<servername>> Queued mail for delivery
    Type: quit
    output:
    221 2.0.0 <servername> Service closing transmission channe
    3)  Check alerts are enabled for your web application
          verify if the windows timer service is running or not.
          Run this stsadm command to check that
          Stsadm.exe -o getproperty -url http://SharePoint-web-App-URL -pn alerts-enabled
         This should return <Property Exist="Yes" Value="yes" />
         If you don’t get this, Enable alerts by:
         stsadm.exe -o setproperty -pn alerts-enabled -pv "true" -url http://SharePoint-web-App-URL
          If its already enabled, try turn off and turn on it back.
    4)  Check the Timer job and Properties
           Go to
           MOSS 2007:  Central Administration > Operations > Timer Job Definitions (under Global Configuration)
           In SharePoint 2010: Central Administration > Monitoring > Review Job Definitions 
           Check whether the "Immediate Alerts" job is enabled for your web application. check these properties:
                       job-immediate-alerts
                       job-daily-alerts 
                       job-weekly-alerts
           stsadm.exe -o getproperty -url "http://Your-SharePoint-web-App-URL" -pn job-immediate-alerts
           The expected output is:
           <Property Exist="Yes" Value="every 5 minutes between 0 and 59"/>.  
           If you don’t get this, run the following command to set its value.
           stsadm.exe -o setproperty -pn job-immediate-alerts -pv “every 5 minutes between 0 and 59" -url http://Your-SharePoint-web-App-URL
    5)  Check whether the account is subscribed for alerts and it has a valid email account. This should be the first thing to check if the problem persists for some users not for      all.
    6)  Then check if at all those users have at least read permission for the list. Because the first mail should go out for every user without security validation but the next ones       won't be delivered unless the user has at least read
    permission.
    7)  If it is happening for one user, can also try to delete and re add the user in the site.
    8)  Most importantly , you should try this one.
          Run this SQL query to the content db < Select * from Timerlock>
          This will give you the name of the server which is locking the content database and since when.
          In order to get rid of that lock 
          Go to that server which is locking the content db and then restart the windows timer service.
          within some time it should release the lock from content db, if not then at the most stop the timer job for some time
          Once the lock will be released then try to send some alerts
          You will surely get the email alert.
    I found this is the most probable reason for alert not working most of the time. We should start troubleshooting with above steps before coming to this step for any alert email issue but from step 1 to step 7 are best for new environments or new servers.
    If the issue is like this ,alert was working before and suddenly stopped working without any environmental change then above conditions in step 1-7 should be ideally fine.
    Even after this if it is not working, then you can try these few more steps too
    9)  Try re-registering the alert template:
    stsadm -o updatealerttemplates -url http://Your-SharePoint-Web-App-URL -f  "c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML\alerttemplates.xml" -LCID 1033
    10)  Try to clear the configuration cache
    If this helped you resolve your issue, please mark it Answered

  • 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.

  • Email notification was sent out twice

    I created two jobs using DBMS_SCHEDULER.CREATE_JOB. The first job was to update the table and the second job was to check the status of the first job in dba_scheduler_job_run_details. I also add email notification on the second job by using DBMS_SCHEDULER.ADD_JOB_EMAIL_NOTIFICATION which sends the email to myself. The problem was the email notification was sent to me twice everytime when I do that. My script is as the follows.
    DBMS_SCHEDULER.ADD_JOB_EMAIL_NOTIFICATION (
    job_name => 'KUDSJ_ENOT_ADBD_ENDPROC'
    ,recipients => '[email protected]'
    ,sender => '[email protected]'
    ,subject => 'Company Schedule Job - %job_owner%.%job_name% - %event_type%'
    ,body => '%event_type% occurred at %event_timestamp%. %error_message%'
    ,events => 'JOB_SUCCEEDED');
    DBMS_SCHEDULER.SET_ATTRIBUTE(
    'KUDSJ_ENOT_ADBD_ENDPROC', 'logging_level', DBMS_SCHEDULER.LOGGING_FULL);
    I am not sure where the problem is. Please help. Thanks.
    cy

    You meant that I should set recipients to null when I do the remove_job_email_notification. I did drop_job and remove_job_email_notification a couple of times already. Could you tell me more specific? Thanks.
    This is what I did.
    DBMS_SCHEDULER.DROP_JOB(job_name => 'KUDSJ_ENOT_ADB_XXXXX');
    DBMS_SCHEDULER.REMOVE_JOB_EMAIL_NOTIFICATION(job_name => 'KUDSJ_ENOT_ADB_XXXXX', events => 'JOB_STARTED, JOB_SUCCEEDED');
    cy

Maybe you are looking for

  • Lack of audio in on a MBP

    A processor failure has forced me to buy a new MBP. I make films and used my old MBP for editing and most importantly, capturing audio real time in stereo (live music) and mono for key interviews. Interviews often in remote places so I cannot cart th

  • ERROR: Package deleted because of bad bind-variable

    hello, i believe to have a serious problem here and i need help. portal deleted packages twice because of a "bad bind variable" so i had to start over again. i'm trying to write a simple blackboard-application. Users can post and read posts. No answe

  • Dreamweaver Templates are Locked

    CS6 I have created some .dwt. I understand that on pages I create from the template only editable regions can be edited. However I thought if I needed to make a change to the template itself in a non editable region, I could and it would update all a

  • Archive based on mask size question

    I'm going to be working with a client who has a production repository in MDME 4.0. It has a size of about 4.5GB. In order to prep for the interaction with the client next week, I've asked for an archive based on a mask. They've created a mask which c

  • Error in Accessing WebService

    Hi All,           I am creating a model in developer studio using Import WebService-DEPRECATED option. Since I don't have user name and password for the URL.(Not Required). Its throwing error when generating proxy. the URL is http://www.abysal.com/so