Forum Stats

  • 3,828,128 Users
  • 2,260,865 Discussions
  • 7,897,487 Comments

Discussions

How to send an e mail based on a value?

Gui Rocha-Oracle
Gui Rocha-Oracle Member Posts: 18 Employee
edited May 20, 2015 3:45PM in APEX Discussions

Hi everyone,

I`m really new in the APEX system, and coding, so i might need more help then it looks.

What i want to do is send an email to someone one month before a especific date set in a column.

What i thought to do is to create a new column with the value:  sysdate - Date_in_the_column.

Now what i don t know how to is how to check this to send an email when my new column value is =30. Do i create a job or a process (i need to constatly check this value right, to know when to send the email)? if so how do i do this?

Thank you in advance

Best Answer

  • Jitendra
    Jitendra Member Posts: 933
    edited May 20, 2015 3:45PM Answer ✓

    Hi Gui Rocha-Oracle,

    Gui Rocha-Oracle wrote:
    
    Hi everyone,
    
    I`m really new in the APEX system, and coding, so i might need more help then it looks.
    
    What i want to do is send an email to someone one month before a especific date set in a column.
    What i thought to do is to create a new column with the value:  sysdate - Date_in_the_column.
    
    Now what i don t know how to is how to check this to send an email when my new column value is =30. Do i create a job or a process (i need to constatly check this value right, to know when to send the email)? if so how do i do this?
    
    Thank you in advance
    

    1. You have to create procedure which includes logic which checks for date.

    2. then you have to create a job to execute your procedure.

    Check this Old thread : Time based event creation

    and Also check this Online Doc : APEX_MAIL

    Hope this helps you,

    Regards,

    Jitendra

    Gui Rocha-Oracle

Answers

  • TexasApexDeveloper
    TexasApexDeveloper Member Posts: 7,933 Gold Crown
    edited May 20, 2015 3:42PM

    Build a package that calls the standard Oracle e-mail package (Example site: Send mail from PL/SQL - Oracle FAQ)

    Build a scheduled job using dbms_scheduler that calls your procedure, having it called once a day.  In your procedure do a select to determine if there are any rows to process, if so loop through and send an e-mail..

    Thank you,

    Tony Miller
    LuvMuffin Software
    Ruckersville, VA

    Gui Rocha-Oracle
  • Jitendra
    Jitendra Member Posts: 933
    edited May 20, 2015 3:45PM Answer ✓

    Hi Gui Rocha-Oracle,

    Gui Rocha-Oracle wrote:
    
    Hi everyone,
    
    I`m really new in the APEX system, and coding, so i might need more help then it looks.
    
    What i want to do is send an email to someone one month before a especific date set in a column.
    What i thought to do is to create a new column with the value:  sysdate - Date_in_the_column.
    
    Now what i don t know how to is how to check this to send an email when my new column value is =30. Do i create a job or a process (i need to constatly check this value right, to know when to send the email)? if so how do i do this?
    
    Thank you in advance
    

    1. You have to create procedure which includes logic which checks for date.

    2. then you have to create a job to execute your procedure.

    Check this Old thread : Time based event creation

    and Also check this Online Doc : APEX_MAIL

    Hope this helps you,

    Regards,

    Jitendra

    Gui Rocha-Oracle
This discussion has been closed.