HTMLDB_MAIL

I was using this package to send mail from within my application. I have now decided to move this code to a database table level trigger. It is not working. Is it possible to continue to use htmldb_mail.send from a table trigger or do I need to revert back to send_mail?

Scott,
1) Can you provide more details on "it is not working"? That could be due to anything, but without more details, there's no way to asess what is going on.
2) "do I need to revert back to send_mail" - I'm not sure what you're saying in this sentence. What is send_mail?
Joel

Similar Messages

  • Define ndr in htmldb_mail

    I am using htmldb_mail PL/SQL package, where P_FROM have to be a certain user, but as admin, I want to put my email as NDR for deliver-failed emails. Is there a flag in htmldb_mail I can use to do so?

    Please see Re: APEX 2.2. This procedure must be invoked from within an application ses
    Scott

  • Htmldb_mail and charset

    Hi to all;
    I'm using htmldb_mail package to send plain-text e-mails, there are some way to change the default (i guess) uft-8 charset to iso-8859-1?
    Some e-mails clients like hotmail are not displaying my emails correct;
    Thanks;

    Hey scott, thanks for the thread
    It s been a while since i posted this tread but we ve postponed the e-mail problem for a while...
    Now I m facing another problem...
    I can not make none of the procedures evoked from the job running correct
    I am getting the same errors: It is either ORA-00942 or ORA-06576...
    However I get no compilation errors on the procedures in the sql developer
    All the problems came when we moved from APEX 2.2 to APEX 3.0 ...
    Thanks in Advance
    Tsveti

  • Htmldb_mail and multiple rows

    I would like to send via email the result of a query that returns multiple rows. How can I achieve that ? The following code example explains in detail what I would like to have - but it doesn't work like that.
    DECLARE
    remp varchar2(4000);
    BEGIN
    remp := 'select name from employee';
    htmldb_mail.send(
    p_to => '[email protected]',
    p_from => '[email protected]',
    p_body => 'These are the employees: '||remp||'',
    p_subj => 'mail test');
    END;
    Thanks Tobias

    hi Tobias,
    you need to use cursor, to collect all your employee names into one variable, after that include that variable in your mail body.
    Declare
    remp varchar2(4000);
    CURSOR cur IS
    SELECT name
    FROM employee;
    rec cur%ROWTYPE;
    begin
    OPEN cur;
    LOOP
    FETCH cur INTO rec;
    EXIT WHEN cur%NOTFOUND;
    remp:=remp||', '||rec.name;
    END LOOP;
    CLOSE cur;
    htmldb_mail.send(
    p_to => '[email protected]',
    p_from => '[email protected]',
    p_body => 'These are the employees: '||remp||'',
    p_subj => 'mail test');
    end;
    hope this help.

  • HTMLDB_MAIL.SEND does not work with 11g

    Hi Guys,
    I have a simple application that uses HTMLDB_MAIL.SEND. I am running APEX 3.0 against an 11g database. When run against a 10g DB all is good. But with 11g I get
    ORA-24247: network access denied by access control list (ACL)
    I looked up the error which recommends altering ACL stuff, which I know nothing about. Is there a simple way to get rid of this error.
    O.

    Hi,
    I have the same problem as you.
    Colud you please explain me how did you resolve it.
    Thanks
    HTMLDB_MAIL.SEND does not work with 11g

  • Htmldb_mail - prossibility to set "REPLY" ?

    Hello,
    I need to implement a mail functionality in HTMLDB where the "REPLY"-adress is different to the sender of the mail.
    Is there any chance to do this with htmldb_mail or do you have any other ideas ? A sample would be nice...
    Thanks a lot and kind regards from cold Munich
    Stephan

    Hi,
    You can, there are overloaded versions of the SEND procedure which allow setting of the reply to address -
    jes@DBTEST> desc apex_mail
    PROCEDURE SEND
    Argument Name                  Type                    In/Out Default?
    P_TO                           VARCHAR2                IN
    P_FROM                         VARCHAR2                IN
    P_BODY                         VARCHAR2                IN
    P_BODY_HTML                    VARCHAR2                IN     DEFAULT
    P_SUBJ                         VARCHAR2                IN     DEFAULT
    P_CC                           VARCHAR2                IN     DEFAULT
    P_BCC                          VARCHAR2                IN     DEFAULT
    PROCEDURE SEND
    Argument Name                  Type                    In/Out Default?
    P_TO                           VARCHAR2                IN
    P_FROM                         VARCHAR2                IN
    P_BODY                         CLOB                    IN
    P_BODY_HTML                    CLOB                    IN     DEFAULT
    P_SUBJ                         VARCHAR2                IN     DEFAULT
    P_CC                           VARCHAR2                IN     DEFAULT
    P_BCC                          VARCHAR2                IN     DEFAULT
    PROCEDURE SEND
    Argument Name                  Type                    In/Out Default?
    P_TO                           VARCHAR2                IN
    P_FROM                         VARCHAR2                IN
    P_BODY                         VARCHAR2                IN
    P_BODY_HTML                    VARCHAR2                IN     DEFAULT
    P_SUBJ                         VARCHAR2                IN     DEFAULT
    P_CC                           VARCHAR2                IN     DEFAULT
    P_BCC                          VARCHAR2                IN     DEFAULT
    P_REPLYTO VARCHAR2 IN
    PROCEDURE SEND
    Argument Name                  Type                    In/Out Default?
    P_TO                           VARCHAR2                IN
    P_FROM                         VARCHAR2                IN
    P_BODY                         CLOB                    IN
    P_BODY_HTML                    CLOB                    IN     DEFAULT
    P_SUBJ                         VARCHAR2                IN     DEFAULT
    P_CC                           VARCHAR2                IN     DEFAULT
    P_BCC                          VARCHAR2                IN     DEFAULT
    P_REPLYTO VARCHAR2 IN
    [pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • HTMLDB_MAIL.SEND to AOL addresses

    Many of my apps engage the HTMLDB_MAIL.SEND procedure to send automated e-mail notifications. I've found that e-mails sent via this procedure do not reach aol.com addresses. I looked on AOL's web site and found the following policy:
    America Online, Inc. ("AOL") does not authorize the use of its proprietary computers and computer network (the AOL Network") to accept, transmit or distribute unsolicited bulk e-mail sent from the Internet to AOL members. In addition, Internet e-mail sent, or caused to be sent, to or through the AOL Network that makes use of or contains invalid or forged headers, invalid or non-existent domain names or other means of deceptive addressing will be deemed to be counterfeit.
    I am guessing that the headers coming out of HTML DB are invalid. Any one have any ideas as to how I can change the header and pass muster with AOL? I'm thinking if I change the "from" line it could solve the problem.
    Thanks.
    Bill

    By the way, this is a header from an HTML DB email. Anyone know what the phrase "misconfigured sender" means?
    Received: from rhdev10g.mycompany.com (unknown[209.234.83.168](misconfigured sender))
    by rwcrmxc22.comcast.net (rwcrmxc22) with ESMTP
    id <20050816170645r22001eft3e>; Tue, 16 Aug 2005 17:06:55 +0000
    X-Originating-IP: [209.234.83.168]
    Received: from localhost (localhost.localdomain [127.0.0.1])
         by rhdev10g.mycompany.com (8.12.11/8.12.11) with SMTP id j7GHPiCr019616;
         Tue, 16 Aug 2005 12:25:44 -0500
    Date: Tue, 16 Aug 2005 12:25:44 -0500
    Message-Id: <[email protected]>
    MIME-Version: 1.0
    To: [email protected]
    From: [email protected]
    Subject: AOL Test
    Reply-To: [email protected]
    Content-Type: text/plain; charset=utf-8

  • Apex 3.1 - checkbox for selecting email addr - problem w/ HTMLDB_MAIL.SEND

    So prior to the upgrade to 3.1 I had working where I use a multi-select checkbox to show email addresses with a comma behind each email address it to send via:
    HTMLDB_MAIL.SEND(
         p_to => :P24_EMAIL_LIST,
    p_cc => :P24_CC_EMAIL_LIST,
    And basically the list looked like this and was stored like this [email protected],:[email protected],:[email protected]
    The way checkbox selection are stored in the database it has the colon separation. Prior to 3.1 it would send with colon : preceeding the email address, but now it doesn't. Any thoughts? I've tried using Trim(':' xxx) but not solved it yet
    Message was edited by:
    user604228

    Hi Frank,
    Can you show me the code you used to create the multi-select checkbox to show email addresses with a comma behind each email address it to send via:
    HTMLDB_MAIL.SEND(
    p_to => :P24_EMAIL_LIST,
    p_cc => :P24_CC_EMAIL_LIST,
    I'm trying to do the same or something similar to this [http://cloudisfuture.blogspot.com/2012/05/sendemail-to-multiple-contacts in apex-oracle.
    I'm using Apex 4.0 on oracle express edition 11g.
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Using htmldb_mail.send from a job

    Hi , I'm trying to use the htmldb_mail.send from sqldeveloper, but I dont see it in APEX mail queue and I dont get the mails . I tried from all users (flows_020000,htmldb_public_user) without sucesses, what am I doing wrong ?
    p.s.
    i'm trying to create a job that will send email regulary .
    regards,
    sagsag

    declare
    tomail varchar2(30):='[email protected]';
    frommail varchar2(20):='[email protected]';
    text varchar2(30) :='mail from htmldb_public_user';
    begin
    htmldb_mail.send(
    p_to => tomail,
    p_from => frommail ,
    p_body => text,
    p_subj => text);
    end;

  • Htmldb_mail.send problem

    For some reason some of our customers have been receiving multiple copies of a same message. We are sending notifications to our clients and sometimes we can send out 4000 emails at a time.
    Here is a trimed down example of the code that will allow to reproduce.
    declare   
        I INTEGER := 1;
    begin
      --Sending message to customer
      WHILE I < 1500 LOOP
        htmldb_mail.send(
          p_to   => 'email_from', -- Change this to something valid
          p_from => 'email_to',    --  Used my inbox to tes
          p_body => 'TEST' || I,
          p_subj => 'TEST' || I );
        I := I + 1;
      END LOOP;
    end;What I get in my inbox when testing is 3000 + messages. Is there a limit on how many emails can be managed at a time in the queue?
    I do not push the queue, I let it manage itself. We are using HTMLDB 2.0 and yes I know we should upgrade but it's not going to happen anytime soon.
    P.S. When doing the same exercise with under 1000 loops, it works properly.
    Thanks in advance for any help.

    I did some more testing and it would seem that it's the HTMLDB_MAIL.PUSH_QUEUE that is to blame. I do not push the queue but we have other applications that call it.
    If I have messages in the queue that are waiting and two other applications call the push queue I will receive multiple copies of the messages that are waiting to be sent.

  • HTMLDB_MAIL.SEND problem when sending HTML

    We had a test application running off of the Oracle hosted site. We used HTMLDB_MAIL.SEND and P_BODY_HTML successfully. However, now we are running on our own hosted site of the production release of 1.6 (no code changes whatsoever, just an export/import). When we send the P_BODY_HTML it is not converted to html, it is sent as text with the html tags embedded.
    In the meantime we have written our own mail procedure, but we were hoping the version of 1.6 that is available was the same as the hosted version.
    Is there something else we should be aware of?
    Thanks!

    Joel,
    I have the following with P_EMAIL_BODY my text body:
    create or replace PROCEDURE "MR_SEND_MAIL"
    ( P_TO_EMAIL IN VARCHAR2,
    P_EMAIL_BODY IN VARCHAR2,
    P_EMAIL_SUBJ IN VARCHAR2 ) is
    L_ERRMSG VARCHAR2(200);
    L_BODY VARCHAR2(4000):='';
    begin
    l_ERRMSG := 'HTMLDB_MAIL.SEND()';
    L_BODY:= L_BODY||'<HTML><HEAD><META http-equiv=Content-Type content="text/html; charset=iso-8859-1">'||chr(10);
    L_BODY:= L_BODY||'<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>'||chr(10);
    L_BODY:= L_BODY||'<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">'||chr(10);
    L_BODY:= L_BODY||replace(P_EMAIL_BODY,chr(10),'<BR>')||'</BODY></HTML>'||chr(10);
    HTMLDB_MAIL.SEND(
    P_TO => P_TO_EMAIL,
    P_FROM => '[email protected]',
    P_BODY => 'this must be viewed by an html enabled client',
    P_BODY_HTML => L_BODY,
    P_SUBJ => P_EMAIL_SUBJ);
    l_ERRMSG := 'PUSH_QUEUE.';
    BEGIN
    wwv_flow_mail.push_queue(
    P_SMTP_HOSTNAME => 'gilbert.esc.net',
                   P_SMTP_PORTNO => '25');
    EXCEPTION
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR(-20080,'MR_SEND_MAIL: '||l_ERRMSG);
    END;
    end;
    It does not work properly. I'm using Groupwise and have my client set for HTML.
    Should I have mult-part somewhere?
    Any help be appreciated, Bill
    Message was edited by:
    Bill Carlisle

  • Htmldb_mail sending

    Hi All,
    I want one solution,Actually i need to know how can i send an email from my apex application on date on which user enters in tab,i have procedure htmldb_mail.send() but i need to send email on the day on which user enters by selecting in calender.
    Thanks

    Hi There.
    Well, I am using Oracle 10g.
    They have a new, slightly more user friendly, utility which I forgot to mention. I think this is a replacement for DBMS_JOB. It's called DBMS_SCHEDULER.
    The following is from http://tahiti.oracle.com
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB(
       job_name          =>  'job1',
       job_type          =>  'PLSQL_BLOCK',
       job_action        =>  'INSERT INTO employees VALUES (7935, ''SALLY'',
         ''DOGAN'', ''[email protected]'', NULL, SYSDATE,''AD_PRES'', NULL,
          NULL, NULL, NULL);');
       start_date        =>  SYSDATE,
       repeat_interval   =>  'FREQ = DAILY; INTERVAL = 1');
    END;
    /If you take a look at the following url you should find all the information you need but if you struggle, please reply with your code and we can take a look.
    http://tinyurl.com/5dvvlm
    Kind regards
    Simon Gadd

  • HTMLDB_MAIL.SEND smtp username/password setting

    I use HTMLDB_MAIL.SEND to send email from apex interface.
    But how i can define userneme, password and smtp server ??
    thank's a lot.
    Bye

    In Apex Instance Administration page (login to Internal workspace as admin),
    Under Home>Manage InstanceInstance>Settings menu, there is an Email section.
    You can specify the following items:
    SMTP Host Address      
    SMTP Host Port      
    SMTP Authentication Username      
    SMTP Authentication Password      
    Administration Email Address      
    Notification Email Address      
    Maximum Emails per Workspace
    If you do not have right to acces it, ask your DBA for help.

  • Reference app_image from htmldb_mail.send

    Hi all,
    I'm using html_db to send the users a confirmation email.
    I was wondering if it is possible to reference the uploaded images when sending the mail.
    I would like to avoid making clobs, by just referencing the image directly thru app_image in htmldb_mail.send procedure.
    Is this possible? If yes, what's the syntax?
    Thanx,
    Pim

    Hi,
    This might help
    http://download.oracle.com/docs/cd/E14373_01/apirefs.32/e13369/apex_mail.htm#CHDDAAJE
    In email HTML body use img tag like
    <img src="http://myserver:port/i/my_image.gif" alt ="" />Br,Jari

  • '!' while using the HTMLDB_MAIL.SEND package

    Hi,
    Someone please help me,
    I have this link that I send in my mail through htmldb.
    Now I call the mail package in the procedure as follows :
    HTMLDB_MAIL.SEND(
    P_TO => '[email protected]',
    P_FROM => '[email protected]',
    P_BODY => v_adm_html||l_body_html,
    P_BODY_HTML => v_adm_html||l_body_html,
    P_SUBJ => 'Request Number: '||v_req_id||' created ');
    but there is this exclamation mark that gets added in the link....
    I dont know how it got generated....
    Can someone help me here
    Thanks,
    DJ

    A similar 'effect' I experience is that somewhere in the html_bodytext, not regular, not always, now and then, also '!' do pop up.
    I have no idea why: resending the same body-text: either no '!' at all or... on different place(s) in the mail.
    Mail is send from Oracle-XE with APEX 2.1 (standard version supplied by Oracle) running on a Windows-XP machine.
    Any help is welcome.
    Jan.

Maybe you are looking for