10 G UTL_MAIL question.

I've followed this:
http://www.oracle-base.com/articles/10g/PlsqlEnhancements10g.php#UTL_MAIL
Question is:
Is it possible that I can use 'to_recipient_variable' instead of hard coded values ([email protected], [email protected], etc.) in Recipient because I want to use this feature in my search form that I've created using 10G-forms builder.
fyi:
I've 'email_field' in the 10G DB which I will search through 10G-based form and after getting the result I want to send emails to everybody who got the hit.
Thanks.
Gaurav

This is a database question better suited for the database forum. But having said that...
You can create a stored prcedure in the database, and pass the values to it that you want the procedure to use. You don't need to hardcode the values.

Similar Messages

  • 10G UTL_MAIL question

    I've followed this:
    http://www.oracle-base.com/articles/10g/PlsqlEnhancements10g.php#UTL_MAIL
    Question is:
    Is it possible that I can use 'to_recipient_variable' instead of hard coded values ([email protected], [email protected], etc.) in Recipient because I want to use this feature in my search form that I've created using 10G-forms builder.
    fyi:
    I've 'email_field' in the 10G DB which I will search through 10G-based form and after getting the result I want to send emails to everybody who got the hit.
    Thanks.
    Gaurav

    This is a database question better suited for the database forum. But having said that...
    You can create a stored prcedure in the database, and pass the values to it that you want the procedure to use. You don't need to hardcode the values.

  • Questions regarding UTL_MAIL package

    Hi All,
    I created a script to sent mails from oracle database to my group using UTL_MAIL package.
    I want to improve the mail package now. Can we have a tabular structure With colors in the mail so that I can show the data in the mail as a report.
    Appreciate your response.
    Thanks,
    Madhu K.

    Dear All,
    I worked on one small demo example to sent a HTML formated mail from Oracle Database.
    This is Just for Reference.
    Appreciate the feedback and corrections from Oracle Gurus...
    FYI: I created a dummy table having 3 columns.
    CREATE OR REPLACE PROCEDURE pr_send_email IS
    str         VARCHAR2(32000) :=NULL;
    ln_counter     PLS_INTEGER;
    BEGIN
    SELECT COUNT(1) INTO ln_counter FROM LOG_ERROR WHERE TRUNC(create_date) = TRUNC(SYSDATE);
    For REC1 IN 1 .. ln_counter LOOP
    FOR REC2 IN (  SELECT FROM (SELECT ROWNUM RNO, LOG_ERROR.* FROM LOG_ERROR )WHERE RNO = REC1) LOOP*
    str :=  str||'<tr>
    *<td align="Center" style="background-color:#FFFFCC" >'||REC2.ERRNO||'</td>*
    *<td align="Center" >'||REC2.ERRNAME||'</td>*
    *<td align="Center" >'||REC2.ERR_DATE||'</td>*
    *</tr>'||chr(10)*
    END LOOP;
    END LOOP;
    IF   NVL(str,'NULL') !='NULL' THEN
    str :=   '<table Width="100%" border="3">'||CHR(10)||'<caption stype="background-color:#FF9999">Daily Error Report</caption>'||CHR(10)||'<tr>
    *<th style="background-color:#33CCCC">Error-No</th>*
    *<th style="background-color:#33CCCC">Error-Name</th>*
    *<th style="background-color:#33CCCC">Error-Date</th>*
    *</tr>'||CHR(10)||str|| '</table>';*
    END IF;
    dbms_output.enable(1000000);
    dbms_output.put_line(str);
    UTL_MAIL.SEND(
    sender =>      '[email protected]'
    *,recipients => '[email protected]'*
    *,cc => '[email protected]'*
    *,bcc => NULL*
    *,subject => 'TCS Daily Error report'*
    *,message => 'Hi Team,'||'
    '||'Please find the issues below in the Table '||'
    '||str ||'
    '||'This is a Automated Generated Mail, Do not reply back',*
    mime_type => 'text/HTML; charset=us-ascii'
    *,priority => 1*
    END pr_send_email;
    EXEC pr_send_email  ;
    Regards,
    Madhu K.

  • Exec utl_mail.send when mouse click

    Hi,
    I have a question,
    I want to exceute the exec utl_mail.send inside when mouse click i a form. how can i do that?
    Thanks and regards

    The ULT_MAIL, package is a utility for managing email which includes commonly used email features, such as CC, BCC etc.
    To install UTL_MAIL
    Method 1:
    sqlplus sys/<pwd>@db_sid
    SQL> @ORACLE_HOME/rdbms/admin/utlmail.sql
    SQL> @ORACLE_HOME/rdbms/admin/prvtmail.plb
    you define SMTP_OUT_SERVER parameter in the init.ora rdbms initialization file. However , if SMTP_OUT_SERVER is not define, this invoke a default of DB_DOMAIN which is guaranteed to be defined to perform appropriately.
    Method 2:
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Connected as SYS
    SQL> grant execute on utl_mail to public;
    Grant succeeded
    SQL> create or replace public synonym utl_mail for sys.utl_mail;
    Synonym created
    SQL> CREATE OR REPLACE FUNCTION SEND_MAIL
    (pIssuer IN VARCHAR2,
    pReceiver IN VARCHAR2,
    pSender IN VARCHAR2,
    pSubject IN VARCHAR2,
    pMessage IN VARCHAR2) RETURN VARCHAR2 IS
    c utl_smtp.connection;
    respuesta utl_smtp.reply;
    pServer VARCHAR2(50) := 'SERVER';
    BEGIN
    -- Open the connection to the Server-mail
    c: = utl_smtp.open_connection (pserver);
    answer: = utl_smtp.helo (c, pServer);
    - Starts the Issuer mail.
    answer: = utl_smtp.mail (c, pSender);
    - Start the receiver
    answer: = utl_smtp.rcpt (c, pReceiver);
    answer: = utl_smtp.open_data (c);
    - Write the header of the e-mail
    utl_smtp.write_data (c, 'From:' | | pIssuer | | utl_tcp.CRLF);
    utl_smtp.write_data (c, 'To:' | | pReceiver | | utl_tcp.CRLF);
    - Write the Subject
    utl_smtp.write_data (c, 'Subject:' | | pSubject | | utl_tcp.CRLF);
    - Write the text of the Message.
    utl_smtp.write_data (c, utl_tcp.CRLF | | pMessage);
    utl_smtp.write_data (c, utl_tcp.CRLF | |'.');
    answer: = utl_smtp.close_data (c);
    - Close connection
    answer: = utl_smtp.quit (c);
    RETURN '0 ';
    EXCEPTION
    Utl_smtp.permanent_error THEN WHEN OR utl_smtp.transient_error
    utl_smtp.quit (c);
    RETURN SQLERRM;
    - raise_application_error (-20000,
    - 'Sending email failed, returning the following error:' | | SQLERRM);
    WHEN OTHERS THEN
    RETURN SQLERRM;
    END;

  • UTL_MAIL:  Send_Attach_Raw / Attachement-Size?

    Just two simple question :-)
    I want to use the UTL_Mail Package from 10g to send emails with attachements.
    Question 1: Can I attach more than one attachment or must I "zip" the files to one file before I can use the package?
    Question 2: What is the maximum size for an attachement?
    The input-parameter for the attachement in the Send_Attach_Row Procedure is of datatype RAW.
    Does this mean an attachement can not be > 32K ???
    If not, how can I send attachements > 32K ???
    Regards
    Udo

    I've not looked at the 10g UTL_MAIL package yet, but I use the UTL_SMTP package provided with 9i (probably also available in 10g). On OTN ther's a demo mail package available which you can alter after studying it. I've added/modified a procedure to that package:
    /* Write a binary attachment (BLOB) */
    PROCEDURE ATTACH_BASE64
    (P_CONN      IN OUT NOCOPY UTL_SMTP.connection
    ,P_DATA      IN BLOB
    ,P_MIME_TYPE IN VARCHAR2 := 'application/octet'
    ,P_INLINE    IN BOOLEAN := TRUE
    ,P_FILENAME  IN VARCHAR2 := NULL
    ,P_LAST      IN BOOLEAN := FALSE
    IS
       i            PLS_INTEGER;
       len          PLS_INTEGER;
    BEGIN
       BEGIN_ATTACHMENT(p_conn, p_mime_type, p_inline, p_filename, 'base64');
       -- Split the Base64-encoded attachment into multiple lines
       i   := 1;
       len := DBMS_LOB.getLength(p_data);
       WHILE (i < len) LOOP
          IF(i + MAX_BASE64_LINE_WIDTH < len)THEN
             UTL_SMTP.Write_Raw_Data (p_conn
                                    , UTL_ENCODE.Base64_Encode(
                                            DBMS_LOB.Substr(p_data, MAX_BASE64_LINE_WIDTH, i)
          ELSE
             UTL_SMTP.Write_Raw_Data (p_conn
                                    , UTL_ENCODE.Base64_Encode(
                                            DBMS_LOB.Substr(p_data, (len - i),  i)
          END IF;
          UTL_SMTP.Write_Data(p_conn, UTL_TCP.CRLF);
          i := i + MAX_BASE64_LINE_WIDTH;
       END LOOP;
       END_ATTACHMENT(p_conn, p_last);
    END;As you can see you will need the demo mail package. You can call this procedure to add several binary attachments with no limit. And I'm sure you somehow can put this in use with the new UTL_MAIL package.
    Hope this helps,
    Michiel

  • UTL_MAIL.SEND max. number of recipients

    hello,
    i would like to know if there is a maximum number of recipients (seperated by comma) I can send an email using the UTL_MAIL.SEND procedure.
    I just found the limitation "Maximum total number of recipients that must be buffered is 100 recipients" but I don't know exactly that means.
    thanks for your help

    Yes, it does. No, you cannot see it unless you unwrap the UTL_MAIL package. Not a worthwhile exercise as the code is some of the worse PL/SQL code I have had the misfortune to see. There is nothing much to learn from it. And if you need serious SMTP and MIME functionality, you will need to look elsewhere than UTL_MAIL for that.
    However - your question relates to SMTP server functionality. How many times can the RCPT TO call be made in succession? That you need to ask your SMTP mail server (via a test, or the mail admin).

  • Utl_mail package

    CONNECT sys/sys_passwd
    @$ORACLE_HOME/rdbms/admin/utlmail.sql
    @$ORACLE_HOME/rdbms/admin/prvtmail.sql
    --define the SMTP_OUT_SERVER parameter in your init.ora initialization file
    --ALTER SYSTEM SET smtp_out_server='my.domain.com' SCOPE=SPFILE;
    BEGIN
    UTL_MAIL.send(sender    => '[email protected]',
    recipients => '[email protected]',
    cc => '[email protected]',
    bcc => '[email protected]',
    subject => 'Testing the UTL_MAIL Package',
    message => 'If you get this, UTL_MAIL package
    really works!');
    END;
    Hi,
    i want to know is there any possibilities in the above bold line to show the other name instead of "sender" email address in the message.
    lets say
    sender email id is '[email protected]" now i want to display in the message "system generated notification" in the place of sender email address?
    is it possible?
    i hope i explained my question properly.

    question resolved.

  • Questions on Print Quote report

    Hi,
    I'm fairly new to Oracle Quoting and trying to get familiar with it. I have a few questions and would appreciate if anyone answers them
    1) We have a requirement to customize the Print Quote report. I searched these forums and found that this report can be defined either as a XML Publisher report or an Oracle Reports report depending on a profile option. Can you please let me know what the name of the profile option is?
    2) When I select the 'Print Quote' option from the Actions drop down in the quoting page and click Submit I get the report printed and see the following URL in my browser.
    http://<host>:<port>/dev60cgi/rwcgi60?PROJ03_APPS+report=/proj3/app/appltop/aso/11.5.0/reports/US/ASOPQTEL.rdf+DESTYPE=CACHE+P_TCK_ID=23731428+P_EXECUTABLE=N+P_SHOW_CHARGES=N+P_SHOW_CATG_TOT=N+P_SHOW_PRICE_ADJ=Y+P_SESSION_ID=c-RAuP8LOvdnv30grRzKqUQs:S+P_SHOW_HDR_ATTACH=N+P_SHOW_LINE_ATTACH=N+P_SHOW_HDR_SALESUPP=N+P_SHOW_LN_SALESUPP=N+TOLERANCE=0+DESFORMAT=RTF+DESNAME=Quote.rtf
    Does it mean that the profile in our case is set to call the rdf since it has reference to ASOPQTEL.rdf in the above url?
    3) When you click on submit button do we have something like this in the jsp code: On click call ASOPQTEL.rdf. Is the report called using a concurrent program? I want to know how the report is getting invoked?
    4) If we want to customize the jsp pages can you please let me know the steps involved in making the customizations and testing them.
    Thanks and Appreciate your patience
    -PC

    1) We have a requirement to customize the Print Quote report. I searched these forums and found that this report can be defined either as a XML Publisher report or an Oracle Reports report depending on a profile option. Can you please let me know what the name of the profile option is?
    I think I posted it in one of the threads2) When I select the 'Print Quote' option from the Actions drop down in the quoting page and click Submit I get the report printed and see the following URL in my browser.
    http://<host>:<port>/dev60cgi/rwcgi60?PROJ03_APPS+report=/proj3/app/appltop/aso/11.5.0/reports/US/ASOPQTEL.rdf+DESTYPE=CACHE+P_TCK_ID=23731428+P_EXECUTABLE=N+P_SHOW_CHARGES=N+P_SHOW_CATG_TOT=N+P_SHOW_PRICE_ADJ=Y+P_SESSION_ID=c-RAuP8LOvdnv30grRzKqUQs:S+P_SHOW_HDR_ATTACH=N+P_SHOW_LINE_ATTACH=N+P_SHOW_HDR_SALESUPP=N+P_SHOW_LN_SALESUPP=N+TOLERANCE=0+DESFORMAT=RTF+DESNAME=Quote.rtf
    Does it mean that the profile in our case is set to call the rdf since it has reference to ASOPQTEL.rdf in the above url?
    Yes, your understanding is correct.3) When you click on submit button do we have something like this in the jsp code: On click call ASOPQTEL.rdf. Is the report called using a concurrent program? I want to know how the report is getting invoked?
    No, there is no conc program getting called, you can directly call a report in a browser window, Oracle reports server will execute the report and send the HTTP response to the browser.4) If we want to customize the jsp pages can you please let me know the steps involved in making the customizations and testing them.
    This is detailed in many threads.Thanks
    Tapash

  • Satellite P300D-10v - Question about warranty

    HI EVERYBODY
    I have these overheating problems with my laptop Satellite P300D-10v.
    I did everything I could do to fix it without any success..
    I get the latest update of the bios from Toshiba. I cleaned my lap with compressed air first and then disassembled it all and cleaned it better.(it was really clean insight though...)
    BUT unfortunately the problem still exists...
    So i made a research on the internet and I found out that most of Toshiba owners have the same exactly problem with their laptop.
    Well i guess this is a Toshiba bug for many years now.
    Its a really nice lap, cool sound (the best in laptop ever) BUT......
    So I wanted to make a question. As i am still under warranty, can i return this laptop and get my money back or change it with a different one????
    If any body knows PLS let me know.
    chears
    Thanks in advance

    Hi
    I have already found you other threads.
    Regarding the warranty question;
    If there is something wrong with the hardware then the ASP in your country should be able to help you.
    The warranty should cover every reparation or replacement.
    But I read that you have disasembled the laptop at your own hand... hmmm if you have disasembled the notebook then your warrany is not valid anymore :(
    I think this should be clear for you that you can lose the warrany if you disasemble the laptop!
    By the way: you have to speak with the notebook dealer where you have purchased this notebook if you want to return the notebook
    The Toshiba ASP can repair and fix the notebook but you will not get money from ASP.
    Greets

  • Question regarding NULL and forms

    Hi all, i have a survey that im working on that will be sent via email.
    I'm having an issue though. if i have a multiple choice question, and the user only selects one of the choices, all the unselected choices return as NULL. is there a way i can filter out anytihng that says "NULL" so it only shows the selected options?
    thanks.
    here is the page that retrieves all the data. thanks
    <body>
    <p>1) Is this your first visit to xxxxxxx? <b><%=request.getParameter("stepone") %></b>
    </p>
    <p> </p>
    <p>2) How did You Learn About xxxxxxx?</p>
    <p><b><%=request.getParameter("steptwoOne") %></b>
      <br>
        <b><%=request.getParameter("steptwoTwo") %></b>
      <br>
        <b><%=request.getParameter("steptwoThree") %></b>
      <br>
        <b><%=request.getParameter("steptwoFour") %></b>
      <br>
        <b><%=request.getParameter("steptwoOther") %></b>
    </p>
    <p> </p>
    <p>3) What was your main reason for visiting xxxxx?</p>
    <p><b><%=request.getParameter("stepthreeOne") %></b>
        <br>
          <b><%=request.getParameter("stepthreeTwo") %></b>
        <br>
          <b><%=request.getParameter("stepthreeThree") %></b>
        <br>
          <b><%=request.getParameter("stepthreeFour") %></b>
        <br>
          <b><%=request.getParameter("stepthreeOther") %></b>
    </p>
    <p>4) did you find the information you were looking for on this site?</p>
    <p><b><%=request.getParameter("stepfour") %>
    <br>
    <b><%=request.getParameter("stepfourOther") %></b>
    </b></p>
    <p>5) Do you plan on using this website in the future?</p>
    <p><b><%=request.getParameter("stepfive") %></b></p>
    <p>6) What is your gender</p>
    <p><b><%=request.getParameter("stepsix") %></b></p>
    <p>7) What is your age group</p>
    <p><b><%=request.getParameter("stepseven") %></b></p>
    8) Would you like to take a moment and tell us how we can improve your experience on xxxxxxxxxx?
    <p><b><%=request.getParameter("stepeightFeedback") %></b></p>

    i was messing around and came up with this. it doesnt remove the null, but if it is null it adds ABC beside it. so i think i might be getting close. i just need to figure out how to replace the null.
    code]
    <b><%=request.getParameter("steptwoFour") %></b>
         <% if (request.getParameter("steptwoFour") == null ) {
         %>
         <% out.print("abc"); %>
         <% }
         %>

  • Anyone know how to remove Overdrive books from my iphone that have been transferred from my computer? They do not show up on itunes. I see a lot of answers to this question but they all are based on being able to see the books in iTunes.

    How do I remove Overdrive books from the library that were downloaded onto my computer then transferred to my iphone? The problem is that they do not show up in iTunes.
    I see this question asked a lot when I google, but they always give answers that assumes you can find the books in iTunes either under the books tab, or the audio books tab or in the music. They do not show up anywhere for me. They do not remove from the app like the ones I downloaded directly onto my iphone.the related archived article does not answer it either.  I even asked a guy working at an apple store and he could not help either.   Anybody...?
    Thanks!

    there is an app called daisydisk on mac app store which will help you see exactly where the memory is focused and consumed try using that app and see which folders are using more memory

  • Basic question

    Hello, i have a basic question. if i have defined 2 fields in a cube or a dso:
    Name Quantity
    and from the external flat file i get some characters for my quantity field. would my load fail?  for standard dso and for write optimized?
    NOTE: quantity field is a keyfigure defined as numeric.
    and the load coming in has "VIKPATEL" for Quantity field and not numbers.
    thanks

    Hi Vik,
    Yes, the load will fail.
    May be you coud first load this data into BW (into PSA) and set both fields as characters fields. Then you can create DSO, do transformation from this PSA to the DSO, and put your logic as to what do you want to do with those Quantity that is not number (e.g. convert to 0, or 'Not assgined', etc).
    You can use transfer rule, or a clean up ABAP code in the start routine.
    Hope this helps.

  • Mid 2010 15" i5 Battery Calibration Questions

    Hi, I have a mid 2010 15" MacBook Pro 2.4GHz i5.
    Question 1: I didn't calibrate my battery when I first got my MacBook Pro (it didn't say in the manual that I had to). I've had it for about a month and am doing a calibration today, is that okay? I hope I haven't damaged my battery? The calibration is only to help the battery meter provide an accurate reading of how much life it has remaining, right?
    Question 2: After reading Apple's calibration guide, I decided to set the MacBook Pro to never go to sleep (in Energy Saver System Preference) and leave it on overnight so it would run out of power and go to sleep, then I'd leave it in that state for at least 5 hours before charging it. When I woke up, the light on the front wasn't illuminated. It usually pulsates when in Sleep. Expectedly, it wouldn't wake when pressing buttons on the keyboard. So, what's happened? Is this Safe Sleep? I didn't see any "Your Mac is on reserve battery and will shut down" dialogues or anything similar, as I was asleep! I've left it in this state while I'm at work and will charge it this afternoon. Was my described method okay for calibration or should I have done something different?
    Question 3: Does it matter how quickly you drain your battery when doing a calibration? i.e is it okay to drain it quickly (by running HD video, Photo Booth with effects etc) or slowly (by leaving it idle or running light apps)?
    Thanks.
    Message was edited by: Fresh J

    Fresh J:
    A1. You're fine calibrating the battery now. You might have gotten more accurate readings during the first month if you'd done it sooner, but no harm has been done.
    A2. Your machine has NOT shut down; it has done exactly what it was supposed to do. When the power became critically low, it first wrote the contents of RAM to the hard drive, then went to sleep. When the battery was completely drained some time later, the MBP went into hibernation and the slepp light stopped pulsing and turned off. In that state the machine was using no power at all, but the contents of your RAM were still saved. Once the AC adapter was connected, a press of the power button would cause those contents to be reloaded, and the machine would pick up again exactly where you left off. It is not necessary to wait for the battery to be fully charged before using the machine on AC power, but do leave the AC adapter connected for at least two hours after the battery is fully charged. Nothing that you say you've done was wrong, and nothing that you say has happened was wrong.
    A3. No, it does not matter.

  • Jabber/WebEx Connect SSO Questions

    I've got a few questions around exactly what needs to be done to get SAML working for our Connect accounts to successfully authenticate from Jabber for Windows, Mac, iPhone, and Android.
    We have both a Meeting Center and Connect account under WebEx using Loose Coupled Integration. Just this past week I enabled SAML for our Meeting Center accounts which went off without a hitch with the exception of Meeting Center integration with Jabber, which is now broken with a message about SSO enabled Meeting Sites not being supported (I think this would maybe be fixed if we had Tight Coupled Integration with our two account?).
    Anyway, my questions are...
    For Windows, I understand all clients will need to be reinstalled with the MSI argument for the SSO_ORG_DOMAIN switch I've read about, is that correct? Are there any other switches needed for the reinstall? 
    How will this work with the Mac and mobile clients? There's obviously no command line options to specify for the installations here, will they just know to kick over to my IdP for authentication once they see an email address that falls under an org with SSO enabled? If so, why does the Windows client need to be completely reinstalled and not just know to find the IdP from the Cloud Connect service like Meeting Center does with the Productivity Tools?
    We're just doing this for our Connect Web IM accounts, not attempting any sort of SSO with the phone accounts/UC integration yet.
    Any ideas on getting the Meeting Center integration into Jabber working again?

    I'd suggest posting your question over on the Jabber Pilot forum, as this forum is specific to Jabber Guest questions:
    https://supportforums.cisco.com/community/4551/jabber-pilot-support
    -jim

  • My iPad wont let me download apps bc security questions, but when I try to make them it freezes

    Every time I try to download an app it tells me I need to update my security questions, but once I click to make the questions the box goes white. So I'm not sure how to fix it

    The new questions show on your account on http://appleid.apple.com ? If they do then try logging out and back into your account on your phone (assuming that is where you are trying to purchase from) and see if the new questions then show on it.

Maybe you are looking for