APEX_MAIL. SEND and HTMLDB_MAIL. Send.

Hello world!

While working on a project of Summit, I noticed that two methods for sending e-mail exists in the project, an APEX_MAIL. SEND that was created by someone else and HTMLDB_MAIL. SEND to which I copied from a website. They both seem to work but I have to pick one, what would be the differences between these two?

They both probably are pointing to the same API with the magic of synonyms.

HTMLDB is a prefix more elderly in the early days of the SUMMIT, as you could see wwv_ as a prefix to some tables/packages.

Tags: Database

Similar Questions

  • Do not get the email sent by APEX_MAIL.send in some areas

    Hello

    I am trying to send an email using apex_mail.send. I do mail successfully in my gmail account, but in my identification of email to office and an area that I do not receive the mail.

    No error shown against these IDs, but do not in the APEX_MAIL_LOG table it becomes mail.

    One has an idea of what can be the issue.

    Thank you

    Sanjaya

    Hi all

    Thanks for your reply. Indeed, the problem was with the receiving server.

    Thank you

    Sanjaya

  • apex_mail send history

    I know that you can check the queue of e-mail and see what's waiting to send or what has failed, as smtp error 421 etc.

    However, is it possible to see all successful deliveries?

    I have a situation where the recipient will never get an email via the apex_mail method, and I need proof to convince the guy from mail server to look at his dressing room.

    See wwv_flow_mail_log for a complete history.

  • APEX_MAIL send results in an HTML table

    Apex 3.2

    I've written a procedure that sends an email with the data of the apex_workspace_activity_log.
    I would try to display that data in a table in the email.
    All the world done this before?
    CREATE OR REPLACE PACKAGE BODY EFSAPX.p_monitor_page_times AS
    
    
      procedure pr_checkelapsed(p_elapsed in number,
                                p_toemail in varchar2) is
    
        v_text clob;
    
      begin
    
        wwv_flow_api.SET_SECURITY_GROUP_ID;
        for x in (select
              application_id,
              application_name,
              page_id,
              elapsed_time
              from
              apex_workspace_activity_log
              where
              application_id = 103
              and elapsed_time > p_elapsed
              and trunc(view_date) > trunc(sysdate-1)
              order by
              elapsed_time desc)
    
        loop
    
          v_text := v_text || 'Application No: ' || x.application_id ||chr(10);
          v_text := v_text || 'Application: ' || x.application_name ||chr(10);
          v_text := v_text || 'Page Id: ' || x.page_id ||chr(10);
          v_text := v_text || 'Elapsed Time: ' || x.elapsed_time ||chr(10);
          v_text := v_text || utl_tcp.crlf;
    
        end loop;
    
        apex_mail.SEND(p_to    => p_toemail,
                       p_from  => '[email protected]',
                       p_body  => v_text,
                       p_subj  => 'Elapsed Time Metric Warning');
    
        apex_mail.push_queue('localhost', 25);
    
      end pr_checkelapsed;
    
    END p_monitor_page_times;
    See you soon

    Gus

    As says below, the real HTML involved is very simple, and there's a lot of documentation available for it.

    I normally use SQL/XML for generating HTML fragments with the embedded data:

    select
        xmlserialize(
            content
            xmlelement(
                "table"
              , xmlconcat(
                    xmlelement(
                        "tr"
                      , xmlconcat(
                            xmlelement("th", 'Application No')
                          , xmlelement("th", 'Application')
                          , xmlelement("th", 'Page ID')
                          , xmlelement("th", 'Elapsed Time')))
                  , xmlagg(
                        xmlelement(
                            "tr"
                          , xmlconcat(
                                xmlelement("td", application_id)
                              , xmlelement("td", application_name)
                              , xmlelement("td", page_id)
                              , xmlelement("td", elapsed_time)))
                        order by elapsed_time desc)))
            indent size=2) html_table
    from
        apex_workspace_activity_log
    where
        application_id = :p_app_id
    and elapsed_time > :p_elapsed
    and trunc(view_date) > trunc(sysdate-1)
    

    This avoids a lot of tedious messing about with concatenation or substitution in the PL/SQL code and translates the own and valid HTML mark-up with all the tags and attributes in the right place. However as apex_mail API docs notes, the p_body_html parameter must be a complete HTML document (and you will probably need to include any other content and style as well as the table). It's a bit tedious to nest this structure in the query, so a combination method of the lower model for the structure of the base HTML document and this approach to SQL/XML query to generate the table with data structure would be a good idea.

    I guess from the wwv_flow_api of . SET_SECURITY_GROUP_ID call that you intend to execute outside a session of APEX? Another option to consider is to create a public page in this app, or as a stand-alone application in the workspace with this query as a region of simple aid report pages/templates, and all the required style embedded in the page. The mail procedure can then use httpUriType.getCLOB to retrieve this page as a complete document which can be passed as p_body_html to apex_mail.send.

    Note the requirement that each line in the content cannot exceed 1000 characters. Whatever method you use will have to be built around model/applications are used (where the dash in the code above), or you need to process the content and insert CRLF at the appropriate places before calling apex_mail.send.

  • "Apex_Mail.Send" with the body table

    Hello

    I would use the APEX_MAIL. SEND and fill the body with a table.

    Something like this:
    declare
    begin
    
    APEX_MAIL.SEND(
    
      p_to =>'my_test@just_debugging.com',
      p_from=>'my_test@just_debugging.com',
     
      p_body=>  chr(10)||
      APEX_UTIL.TABLE_TO_STRING(my_Table, ',') || chr(10)  || -- <- This does NOT work
      TO_CHAR(Select * from My_Table),  -- <- This does NOT work
      
    
      p_subj=>'My Subject');
     
    -- push the e-mail queue for immediate delivery
    wwv_flow_mail.push_queue(
    P_SMTP_HOSTNAME => 'ip',
    P_SMTP_PORTNO => 'port');
    
    end;
    Does anyone know how to do this?

    Sorry...

    DECLARE
       p_vc_arr2   htmldb_application_global.vc_arr2;
       p_string    VARCHAR2 (2000);
    BEGIN
    
    SELECT ename
       BULK COLLECT INTO p_vc_arr2
         FROM emp
        WHERE deptno = :p84_select_deptno; -- Or remove condition.
    
       p_string :=
         HTMLDB_UTIL.table_to_string (p_vc_arr2, ':');
    
    APEX_MAIL.SEND(
    
      p_to =>'my_test@just_debugging.com',
      p_from=>'my_test@just_debugging.com',
    
      p_body=>  p_string
    
      p_subj=>'My Subject');
    
    -- push the e-mail queue for immediate delivery
    wwv_flow_mail.push_queue(
    P_SMTP_HOSTNAME => 'ip',
    P_SMTP_PORTNO => 'port');
    
    end;
    

    In http://apex.oracle.com/pls/otn/f?p=31517:84:2900701551472314

    It should be something like this...

  • Cannot get APEX_MAIL. SEND the job to a position of Planner

    Hello

    I have a problem with sending mail to a scheduler job. If I run the code below in the SQL commands, a task is created, but it does not work.
    In user_scheduler_jobs, the RUN_COUNT = 1 and FAILURE_COUNT = 1. However, to create a job with insert sentence, for example, works without any problem. Also send mail in works of SQL commands. Why can't I get a job with work SEND_MAIL? (I also checked that I should have a privilege to use create.)
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB(
       job_name          =>  'job5',
       job_type          =>  'PLSQL_BLOCK',
       job_action        =>  'begin APEX_MAIL.SEND( p_to => ''some email address'' , p_from => ''some email address'' , p_subj => ''test5'', p_body => ''test5'');  APEX_MAIL.PUSH_QUEUE;
    COMMIT; end;',
       start_date        =>  SYSDATE,
    enabled             => TRUE,  
    
       repeat_interval   =>  'FREQ = DAILY; INTERVAL = 1');
    
    END;
    /
    I tried the above with and without sentences COMMIT and PUSH_QUEUE.

    Perhaps there is a simple solution to what comes, I have not noticed, I hope.


    Tiina

    Hello

    Create the procedure to your schema of the analysis of the application,
    where you ask the security group id (worksapce)
    and then send the mail.

    Call this procedure in DBMS_SCHEDULER job

    Kind regards
    Jari

  • APEX_MAIL. SEND question

    Hi all

    I am able to send e-mail messages using the apex_mail.send package. Unfortunately, all e-mail messages, go to basics / anti-spam folders of our employees email account. I was then advised that, so that messages from the Inbox, I need to specify a name to the message field.

    For example in Yahoo! Mail, when I compose a message, I have on the field of: Allen Sandiego < [email protected] >. Then on recipients, they will see on the Inbox something like: from: Allen Sandiego Subject: subject of the Message.

    How do I do that on apex_mail.send? I tried adding 'Allen Sandiego < [email protected] >' on the p_from parameter, but I get an error.

    Thank you
    Allen

    P_FROM - E-mail address where the email will be sent (mandatory). This e-mail address must be an address that is valid . Otherwise, the message will not be sent.
    his is not your problem, it's the problem of receivers mail client. Tips to get less penalty points: avoid images in the body, avoid html and links in the body, always enter the topic p_subj.

    S.

  • How to automatically send a report after its creation?

    Hello

    I am a beginner and I would be grateful if someone could tell me some general information.

    I found this tutorial how to save and access report.

    Storage and access to the reports in the database

    Onclick is recorded in this report tutorial.

    Y at - it a way to send automatically each time that report is generating or first of all, I would like to save it (PDF, CSV,...) with the SQL script and then send it?

    I also found there related interactive process page that can send e-mail messages. Is it possible the process page to send e-mail with report or must be saved before sending?

    The reason is that we want to have a history of created.

    Thank you in advance.

    874887 wrote:

    The reason is that we want to have a history of created.

    Save the report, and then send it.

    I have call if ENGAGING between the two steps.

    The APEX_MAIL package to send an e-mail with an attachment.

    You should be able to edit the PL/SQL to do it all in one step

    declare
      l_report blob;
    -- Added this for APEX_MAIL
    l_mail_id NUMBER;
    begin
      l_report := apex_util.get_print_document (
      p_application_id => :APP_ID,
      p_report_query_name => 'blobquery',
      p_report_layout_name => 'blobquery',
      p_report_layout_type => 'rtf',
      p_document_format => 'pdf'
      );
      insert into report_archive (
      filename,
      mimetype,
      report,
      created_date,
      created_by
      ) values (
      'BLOB Query Search Results ('||to_char(sysdate,'DDMonYYYY')||')',
      'application/pdf',
      l_report,
      sysdate,
      :USER
      );
    -- COMMIT the insert so you don't e-mail out a report
    -- that was never saved
    commit;
    -- create e-mail here
    l_mail_id := APEX_MAIL.send( ... ); -- see document for usage
    APEX_MAIL.ADD_ATTACHMENT( .. ); -- see document for usage
    end;
    



    MK


  • P - Track Application sends do not mail

    I use the P-Track on APEX 4.2.2 application w / gateway Embeded PL/SQL Oracle 11.2.0.2 DB. Whenever I try to send a report by e-mail from the application it says it was sent successfully, however no email is received. Whenever I have check the queue of e-mail APEX I see with the following error messages:
    ORA-29279: SMTP permanent error: 501 5.1.7 address not valid
    I tried "[email protected]" and "apexuser" (valid user of the APEX) format but none work.

    I can send email from APEX successfully but not the application.

    Thank you
    Leighton

    Published by: LeightonLNelson on May 13, 2013 13:11

    In the diagrams with ptrack, I created this function to be called by the apex (I preceded it EBA for that I would easily identify this as part of the apex packaged, applications as they do their code) with the string 'people ': comma-delimited

    create or replace
    FUNCTION  EBA_VALIDATE_EMAIL
      (p_email      IN  VARCHAR2
      ,p_domain  IN  VARCHAR2 DEFAULT '@yourdomain.org')
      RETURN VARCHAR2 IS
      lt_emails  apex_application_global.vc_arr2;
      email_string varchar2(4000);
    
    BEGIN
      -- split string into separate addresses
      lt_emails := apex_util.string_to_table(p_string    => REPLACE(p_email,' '), p_separator => ',');
       FOR i IN 1..lt_emails.COUNT LOOP
        if (instr (lt_emails(i), '@')=0) then -- no at sign, so lets append the default domain or the passed domain
          lt_emails(i):=lt_emails(i) || p_domain;
        end if;
        email_string:=  email_string || ',' || lt_emails(i); -- assemble the new list
      END LOOP email_val;
      return substr(email_string,2); -- remove leading comma and return the new list
    END EBA_VALIDATE_EMAIL;
    

    That is to say, entry could be "Joe, [email protected], [email protected], frank, ron" and he'd be back * "[email protected], [email protected], [email protected], [email protected], [email protected]."

    In any apex application, but in this case P-Track, I wrap the page with the function variable in the process of the page where the email is sent, inside the apex_mail_send calls: at Page 20, 37 and 85 - I did not other changes:
    * (this is an excerpt from P20) :*

    declare
       l_clob clob;
       l_message varchar2(4000);
       l_to varchar2(64):=:P20_TO;
       l_from varchar2(64):=:P20_FROM;
       l_cc varchar2(64):=:P20_CC;
    
    begin
    for c1 in (select clob001 from apex_collections where collection_name = 'EMAIL') loop
    l_clob := c1.clob001;
    l_message := nvl(:P20_MESSAGE,'');
    l_clob := ''||l_message||l_clob||'';
    
    APEX_MAIL.SEND(
        p_to => eba_validate_email(l_to),
        p_from => eba_validate_email(l_from),
        p_body => nvl(to_clob(l_message),''),
        p_body_html => l_clob,
        p_subj => :P20_SUBJECT,
        p_cc  => eba_validate_email(l_cc),
        p_bcc   => null,
        p_replyto => l_from);
    
    apex_mail.push_queue;
    end loop;
    commit;
    

    It of simple and not otherwise very surprising, but it works wonders for us. All of our users are authenticated via ldap, and none of them as owners of AD or otherwise throughout the apps are known as whomever@domain... as anyone. It was a must have, but he also fixed the issue for me is that I think that you are having with the invalid OF not having a domain.

    That said, I also changed the assignment of the: P20_FROM which is view only on this page - either a plsql function body.

    return lower (:APP_USER);
    

    .. but it could have been forced in the process of the code block too, or otherwise I could have not used a call to apex_mail_send, but my send e-mail feature and enter the APP_USER he... etc. etc. etc. (so many ways to achieve the same result)

  • Send email to multiple users

    I use Apex 4.1 and need to send e-mail based on some condition.

    I need to send an e-mail to two people A and B if APPUSER is based in APAC and otherwise to send email to anyone C

    I have the slider that gets this information, but do not know how to use it in the code for apex_mail.send

    How to apply the values returned by the cursor on the code below?

    ----------

    Open mailcursor (this slider returns A and B or C just)

    () apex_mail. Send
    p_to = > XXXXXXXXXX (it should send two people or based on the extracted value of the cursor).
    P_FROM = > '[email protected] ',.
    p_cc = > NULL,
    p_body = > ' * this is a system generated message, please do not respond to this *' |
    Chr (10) | UTL_TCP. CRLF. "Please check data ' |"
    Chr (10) | UTL_TCP. CRLF. 'Employee' | : P8_EMP_EMAIL |' raised demand on demand ' |
    Chr (10) | UTL_TCP. CRLF. "Thank you,.
    p_subj = > 'New demand Alert');

    LKSwetha wrote:
    I use Apex 4.1 and need to send e-mail based on some condition.

    I need to send an e-mail to two people A and B if APPUSER is based in APAC and otherwise to send email to anyone C

    I have the slider that gets this information, but do not know how to use it in the code for apex_mail.send

    How to apply the values returned by the cursor on the code below?

    ----------

    Open mailcursor (this slider returns A and B or C just)

    Please post code using .

    ...\
    

    Tags.

    apex_mail.send(
    p_to => XXXXXXXXXX ( it has to send to two people or one based on value fetched from cursor ) ,
    p_from => '[email protected]',
    p_cc => NULL,
    p_body => '***** This is a system generated message, please do not reply to this *****'||
    chr(10) || utl_tcp.crlf || 'Please check for the data '||
    chr(10) || utl_tcp.crlf || 'As Employee '||:P8_EMP_EMAIL||' has raised request on application '||
    chr(10) || utl_tcp.crlf ||'Thanks',
    p_subj => 'New Request Alert' );
    

    As stated in the documentation ofapex_mail.send of documentation for the p_to parameter:

    Valid e-mail address to which the e-mail will be sent (mandatory). To several email addresses, use a comma-separated list

  • ORA-20001 send Email of APEX

    Until anyone responds... I 'm affecting the security group ID. ;-)

    The inside APEX, I created a simple test application that allows the user to enter a phone number and the code attempts to use e-mail to send to the phone number, that is a message "text".

    The page was just an edit individual line and a button control. The button triggers a process called 'TextEmProc '.

    "TextEmProc" was just a few lines:

    < PRE >
    DECLARE

    ls_JustTheNums VARCHAR2 (32);

    BEGIN

    ls_JustTheNums: = RegExp_Replace (: P1_MOBILE_NUM, "[^ [: digit:]]'," ");

    wwv_flow_api.set_security_group_id;

    APEX_040000.APEX_MAIL. SEND (p_to = > ls_JustTheNums |) "@txt.att.net.
    P_FROM = > 'your Apex App friendly. "
    p_body = > "Someone's average margin");

    END;
    < / PRE >

    The appellant, translates the error message: "ORA-20001: this procedure must be called from an application session.»

    This never works and always gets this error. Anyone have an idea what is wrong?

    Thank you

    -Joe

    Hey Joe,

    If you use the package of mail in an APEX application so no need to set the security_group_id, because it is already defined.

    Try the following code:

    DECLARE
       ls_JustTheNums VARCHAR2(32);
    BEGIN
       ls_JustTheNums := RegExp_Replace( :P1_MOBILE_NUM, '[^[:digit:]]', '' );
       APEX_MAIL.SEND( p_to    => ls_JustTheNums || '@txt.att.net',
                               p_from  => 'Your Friendly Apex App',
                               p_body  => 'Someone is Way Out of Margin' );
    END;
    

    Note: That I also deleted APEX_040000 of your call APEX_MAIL scheme name. You should not use references to hard-coded patterns, because if you upgrade to 4.1 APEX your code will no longer work.

    BTW, at APEX 4.0, you can also use use the declarative process type 'Send E-Mail' and use & PX_XXXX. syntax to refer to dynamic values.

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • 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

  • Send a Mail in OPTION

    Hi friends,

    I create an email option in my application and I have something in the selection list. Return value of the select list are EMAIL and INTERNAL.
    I want when I select selection list EMAIL, then mail must be addressed. My name is P81_TYPE and my code is
    DECLARE
    
    l_id number;
    to_add varchar2(1000):=:P81_TO; --P81_TO (mentioned another gmail ID)
    from_add varchar2(1000):=:app_user;
    l_body varchar2(4000):=:P81_ACTIVITY_SUMMARY;
    l_sub varchar2(1000):=:P81_SUBJ;
    
    BEGIN
    
      if (:P81_NOTEE_TYPE:=MAIL)
    THEN
       l_id:=APEX_MAIL.SEND(
            p_to        => to_add, -- change to your email address
            p_from      => from_add,
            p_body      => l_body,
            P_subj      => l_sub);
    
    FOR c1 IN (SELECT name, blob_content, mime_type 
            FROM CRM_DOC_FILE where ID IN (select ID from DUMY_SELECTED_ATTCH_FILE )
            ) LOOP
    
            APEX_MAIL.ADD_ATTACHMENT(
                p_mail_id => l_id,
                p_attachment => c1.blob_content,
                p_filename   => c1.name,
                p_mime_type  => c1.mime_type);
            END LOOP;
    
    
           COMMIT;
    apex_mail.push_queue(
    P_SMTP_HOSTNAME => '205.145.0.26',
    P_SMTP_PORTNO => 25);
    commit; 
    End if;
    END;
    How can I do that.

    Thank you

    Published by: 805629 on December 20, 2010 01:04

    What exactly is the problem you are having, I see nothing wrong with your code with the exception of the following line

    If (: P81_NOTEE_TYPE: = MAIL)

    It should be (extra quotes around a string and changed the name of the item to the one you mentioned)

    IF (: P81_TYPE: = 'MAIL')

    You can also remove the if condition in the code and make the treats PL/SQL conditional itself.

  • Plan a Mail sending work with APEX

    Hello

    I would like to know if it is possible to schedule a task with APEX e-mail (for purposes such as reminders of birthday etc.). Currently, I am able to send e-mail to APEX by creating a process that is triggered by a button. I use the apex_mail.send procedure to send e-mail messages. It works fine, but ideally I would like the email sending process to be scheduled to run independent manual trigger, i.e. the date system should be the trigger, and it should repeat after a specified interval. (The method must be such that emails are sent in even when the APEX application is not running, i.e. the process should take data directly from the database.)

    Thank you
    Kamal

    You're forgiven :)

    This isn't really a specific thing to the apex, but more than the database itself. However, you can use the Apex development environment to create procedures (very powerful) database.
    If you go to the workshop of SQL, then the SQL commands (or through the object browser, and then create procedure), you will be able to create these functions and procedures. As I see it from here, these functions will run the backend once the Scheduler is running (such as Task Scheduler in Windows), but you can manage your data (e.g. adding birthdays) Apex of course. Hope that helps!

  • Send emails to all your contacts

    Hello
    I use APEX 4.2 to implement a project. One of the requirements is to send an e-mail to all e-mail addresses stored in the table.
    Can anyone suggest anyway to make this option?

    Sure...

    Define a procedure that makes a loop on all records relevant to your table. Then, use the APEX_MAIL.send procedure to send.

    begin
      for i in (select email from emp) loop
        apex_mail.send(); -- work out the parameters for yourself.
      end loop;
    
      apex_mail.push_queue();
    end;
    

Maybe you are looking for

  • Essential Apple apps are no longer free?

    I bought an iPhone in December of 2014 5s and an iPad 2 Air last week. I just noticed that Garageband, iMovie, Keynote, and Numbers were no longer free. I have Pages (a currently $9.99 app) that I got for free because of my iPhone 5s, and I know the

  • Spotlight search in list

    Hello community, Is there a way to copy a list of file names in the spotlight and make it search for all? Or another piece of software that can do? Thank you!

  • Satellite A300-1QD - start some time and memory errors won't test

    Hello I have some real problems with a brand new satellite A300 1QD.After update of Windows Vista Home Premium 64-bit (Service Pack2) Vista unbootable. After the reboot of forst, it showed a message: File: \windows\system32\winload.exeStatus: 0xc0000

  • I lost the ability to inking on my gateway tablet. No idea how to get it back? I use it often

    Please help me.  Gateway offers no help to me... No.  It is visible; but it is grayed out.  I have no icons tablet of your direct or hidden entry - those you would write normally on.

  • How to uninstall Internet Explorer completely?

    I'm trying to rid my computer of Internet Explorer completely. I have no use for him as I use Mozilla Firefox. I uninstalled Internet Explorer 8, but it restored Internet Explorer 7. My operating system is Vista. Please, please, help!