Apex mail send p_cc question

Hello,
This is probably an easy question. I searched the form and documentation but couldn't find anything.
I'm using apex.mail.send as a process when the user presses a particular button. The user puts in the email address info. The requirement is to send it and cc multiple people.
Based on how I have it set up now, the "To person" is getting the email for each cc. (2 people are cc'd then the "To person" is getting the email twice.) Is it possible to have the people cc'd on the same message so that the "To person" only get's it once?
for c4 in (select EMAIL
from REPORTING_APPS.EMAIL
where EMPLID in ( :P3_CC1,:P3_CC2)) loop
for c1 in (select EMAIL
from REPORTING_APPS.EMAIL
where EMPLID = :P3_ASSIGNED_INDIVIDUAL) loop
apex_mail.send(
p_to => c1.EMAIL,
p_from => '[email protected]',
p_cc => c4.EMAIL,
p_body => l_body,
p_body_html => l_body_html,
p_subj => 'DRAFT’;
end loop;
end loop;
END;
Thanks for any insight! Melissa

Melissa,
You're calling APEX_MAIL.SEND for each cc recipient. You want to create a comma-separated string for the cc recipients and just call APEX_MAIL.SEND just once. Maybe something like:
declare
    l_cc varchar2(1000);
begin
    for c4 in (select EMAIL
                 from REPORTING_APPS.EMAIL
                where EMPLID in ( :P3_CC1,:P3_CC2)) loop
        if length(l_cc) > 0 then l_cc := l_cc || ',';
        l_cc := l_cc || c4.email;
    end loop;
    for c1 in (select EMAIL
                 from REPORTING_APPS.EMAIL
                where EMPLID = :P3_ASSIGNED_INDIVIDUAL) loop
        apex_mail.send(
            p_to => c1.EMAIL,
            p_from => '[email protected]',
            p_cc => l_cc,
            p_body => l_body,
            p_body_html => l_body_html,
            p_subj => 'DRAFT’;
    end loop;
end;Joel

Similar Messages

  • Oracle Apex Mail Send Issue.

    Fyi
    I am using oracle apex 4.2 version.
    i am trying to send mail using APEX_MAIL.send.
    My process like
    begin
    APEX_MAIL.send(
    p_to       => '[email protected]',
    p_from     => '[email protected]',
    p_body     => l_body,
    p_subj     => 'APEX_MAIL Package - Plain Text message');
    end;
    When i check mail queue from administrator part
    HomeManage > InstanceMail > Queue
    It show no error and after the send all mail still i am not geting the mail
    i also check my email setting in administrator part.
    Thanks

    Hi,
    I suggest that you put some debug statements to make sure that there no errors in the input parameters to the apex_mail.send procedure (http://docs.oracle.com/cd/E10513_01/doc/apirefs.310/e12855/apex_mail.htm#insertedID1). If possible, set up a simple example in apex.oracle.com and share the credentials.
    Thanks,
    Rohit

  • Apex_mail.send p_cc format

    Anyone else using the APEX mail send procedure and the p_cc parameter? From what I gather, it only accepts one email address, rather than say a semi-colon or comma delimited list of email addresses. Same can be said of p_bcc. I tried comma and semi-colon lists and they error out. Using the single address works.
    I am hoping someone can prove to me that this can be a list. I want the ability of sending to many cc recipients without sending multiple emails.
    Not much documentation on this, just that it is a VARCHAR2 value.
    TIA,
    Buzz

    Hi Buzz,
    They are comma-separated values.
    I just sent this to myself from apex.oracle.com and it worked fine (using different e-mail addresses, obviously):
    begin
    apex_mail.send( p_to => '[email protected]',
                    p_from => '[email protected]',
                    p_cc => '[email protected],[email protected]',
                    p_subj => 'test',
                    p_body => 'test' );
    end;Joel

  • How many mails i can send at a time per day using APEX mail system?

    HI,
    I am working on application, when i have written a process to send mail, i have a project where i have to send mail at a time for all the email id's
    given list there are upto 5000 email id's where text body also include certain set of data from a report. thinking at a time 3000 its difficult i divided
    it region wise, but still each region have 2000 odd email id's. during testing when i run the process just 950 mails i could send then i got a error
    saying "ORA-20001: You have exceeded the maximum number of email messages per workspace. Please contact your administrator." so please
    can any one help me to know How many mails i can send at a time per day using APEX mail system?
    Thanks in advance
    Gowthami

    Hi jfosteroracle,
    You are getting the error may be the following reason,
    Check the following,
    Login as ADMIN and Goto -->Manage Instance-->Instance Settings--> Mail-->Maximum Emails per workspace
    Actually this number denotes the Number of mails can be sent per 24 hour for the workspace,It may exceeded.
    It may be the reason.
    Thank you.     
    Regards,
    Gurujothi
    Edited by: Gurujothi on Jun 27, 2012 5:54 AM

  • Hi I want to change your e-secret questions because I forgot the answers I have tried sending reset questions on my mail and I have not received mail

    hi I want to change your e-secret questions because I forgot the answers I have tried sending reset questions on my mail and I have not received mail
    New mail that I want is [email protected]
    Alternative to the Old one

    From  King Penguin
    If you have a rescue email address set up on your account then you can try going to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address set up then go to Express Lane  and select 'iTunes' from the list of 'products' in the middle of the screen.
    Then select 'iTunes Store', and on the next screen select 'Account Management'
    Next choose 'iTunes Store Account Questions' or 'iTunes Store account security' (it appears to vary by country) and fill in that you'd like your security questions/answers reset.
    You should get an email reply within about 24 hours (and check your Spam folder as well as your Inbox)

  • Apex Mail Queue stopped sending

    Suddenly the APEX mail queue on our production server has stopped sending emails. We have logged into the internal workspace as ADMIN and can see the emails in the queue. There are no errors against them. We've tried both using the "Send all mails" button and also apex_mail.push_queue() from sqlplus but neither has worked - the emails are just backed up. There are no emails in the sent log with errors.
    The configuration is no different from our development server (ie, same SMTP server, same setup within APEX) and that works fine. We haven't made any changes to anything, it just randomly stopped working the other day.
    We have tried using UTL_SMTP on the prod server and that works fine, so it looks like it's something APEX specific.
    Can anyone offer any advice or help before I raise this as an SR?
    Thanks,
    John

    You should run this query as DBA to see ORACLE_APEX_MAIL_QUEUE job run details.
    This job should run for every 5 min or 3 min depending on your apex version. See the latest run date.
    When you run apex_mail.push_queue; then, it should do the same task what above job does. Pushing the queue didn't help you. So I suggest to raise a SR with Oracle Support.
    Regards,
    Hari

  • Scheduling a Mail Sending Job with APEX

    Hi
    I would like to know if it is possible to schedule an e-mail sending job with APEX(for purposes like birthday reminders etc). Currently, I am able to send e-mail from APEX by creating a process which is triggered by a button. I am using the apex_mail.send procedure to send e-mail. This is working fine, but I would ideally want the email sending process to be scheduled to run independent of a manual trigger, i.e. the system date should be the trigger, and it should repeat after a specified interval. (The method should be such that emails are sent out even when the APEX application is not running,i.e. the process should take the data directly from the database.)
    Thanks,
    Kamal

    Hi Kamal,
    I'm new to this apex tool...I doesnt know how to configure email.....Has i have seen in ur message that you could able to send email from apex but u asked about scheduling in email, a kind of deep concept to some one....I'm not thing of the scheduling right now...Can you please guide me in step wise manner of how to configure email...Since i doesnt know this basic thing of configuring email with the APEX...
    From ur message im sure that ill be getting answer.....Any way thanks in advance for ur help.....
    With Regards,
    Hari R...
    Edited by: HariPrasad on Sep 13, 2010 11:24 PM

  • Send E-mail Send E-mail question

    Hi,
    Im trying out the Developers Toolbox and am trying to figure out if its right for me, and have very basic - beginning MySQL and php skills.
    The tutorial at http://help.adobe.com/en_US/Dreamweaver/9.0_ADDT/help.html?content=ch12_send_email_01.htm l is rather sketchy, when I follow the tutorial on that page:
    "The Send E-mail trigger allows the site developer to automatically send an e-mail when a form is submitted. It is an AFTER trigger, and it can be executed after insert/update/delete/custom transactions.
    This trigger is accessible from the Application panel, Server Behaviors > + > Developer Toolbox > Send E-mail > Send E-mail."
    well, when I try that, I get an error on the page which says:
    "There are no insert, update, custom or login or delete transactions on page. Please insert an appropriate transaction first."
    OK I am assuming that I need some kind of an html form open and on a page, however where do I start? Its as if the tutorials left out a huge chunk of the instructions. I realize I am no expert but if someone was buying the toolbox for the first time how would one know where to start? Do I need to create a new database table first? What kind of table? Can it be a table that is part of the site database for the shopping cart database that I already have linked to the store? Or does it need to be a seperate - database, table? Or just a php page with the form in it? Or does the form page need to be .html?
    Or is the toolkit only for advanced developers with advanced php and MySQL skills and should I not even bother buying it?
    Anyway can someone please give me a hint?
    All I am trying to do is construct a simple email form for my web site which I have created in Dreamweaver and I need a php script to process the data inserted into the form and send it off to the mail server to forward to the webmaster's email address. I have the form created and brought up the form page, but then the Server Behaviors > + > Developer Toolbox > Send E-mail > Send E-mail. Tab is not accessible, and I am assuming that it wont be unless I have a .php file open, so I dont have a clue as to where to start.
    So Ive got 27 days left to determine if its worth buying the toolbox, if I cant figure it out by then then I guess Ill buy some easier to use extension or stand alone to create my email form and other scripts.

    Hi DBS,
    just some thoughts:
    So Ive got 27 days left to determine if its worth buying the toolbox, if I cant figure it out by then then I guess Ill buy some easier to use extension or stand alone to create my email form and other scripts
    honestly said: if sending form data via email is about all you want to achieve, buying ADDT or even trying to learn it would be overkill, as it comes with heaps of features which you´ll probably never need -- in this case investing in a stand alone form-to-email script seems a better solution.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • How can i read only .txt file and skip other files in Mail Sender Adapter ?

    Hi Friends ,
                       <b> I am working on scenario like , I have to read an mail attachement and send the data to R3.</b>
                        It is working fine if only the .txt file comes.
                      <b>Some times ,html files also coming along with that .txt files. That time my Mail adapter fails to read the .txt file.</b>
                       I am using PayLoadSwap Bean and MessageTransformBean to swap and send the attachment as payload .
                         <b>Michal as told to write the Adapter module to skip the files .But i am not ware of the adapter moduel . If any blogs is there for this kind of scenarios please give me the link.</b>
                           Otherwise , please tell me how to write adapter module for Mail  Sender Adapter?
                      How to download the following
                        newest patch of XI ADAPTER FRAMEWORK CORE 3.0
    from SAP Service Marketplace. Open the file with WinZip and extract the following
    SDAs:
    &#61589;&#61472;aii_af_lib.sda, aii_af_svc.sda
    &#61589;&#61472;aii_af_cpa_svc.sda
                        I have searche in servive market place .But i couldn't find that . Can you please provide me the link to download the above .
                      If any other suggestions other than this please let me know.
    Regards.,
    V.Rangarajan

    =P
    Dude, netiquette. Messages like "i need this now! Do it!" are really offensive and no one here is being payed to answer anyone's questions. We're here because we like to contribute to the community.
    Anyway, in your case, just perform some search on how you could filter the files that are attached to the message. The sample module is just an example, you'll have to implement your own. Tips would be to query the filename of the attachments (or maybe content type) and for the ones which are not text, remove them.
    Regards,
    Henrique.

  • Mail Sender Adapter - Attachment Handling

    Hello,
    I 'm using XI 3.0 SP 14.
    I have problems with my Mail-Sender-Adapter.
    The mails, I fetch, have an xml-attachment which
    represents an IDOC-structure (ORDERS.ORDERS05).
    I want to sent this attachment as payload to an SAP-System.
    The problem is now, that I have 2 Payloads (SXMB_MONI).
    One for the normal email-body and one for my original
    xml-attachment. See below:
    - <SAP:Payload xlink:href="cid:[email protected]">
      <SAP:Name>MailMessage</SAP:Name>
      <SAP:Description>mail message</SAP:Description>
      <SAP:Type>Application</SAP:Type>
      </SAP:Payload>
    - <SAP:Payload xlink:href="cid:[email protected]">
      <SAP:Name>MailAttachment-1</SAP:Name>
      <SAP:Description>mail attachment</SAP:Description>
      <SAP:Type>ApplicationAttachment</SAP:Type>
      </SAP:Payload>
      </SAP:Manifest>
      </SOAP:Body>
    The XI Runtime Workbench (SXMB_MONI) takes (in my case)
    the wrong one (email-body-attachment) and gives me
    an parsing error. (Error occurs at my IDOC-Receiver-Adapter)
    Now my question:
    Can I remove the email-body-attachment, so that
    the further processing works with my xml-attachment?
    Or how can I resolve my problem.
    best regards
    Marcel Reichert

    Hi Marcel,
    use the PayloadSwapBean module to get the attachment as main payload.
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
    As parameters use:
    swap.keyName = payload-name
    swap.keyValue = MailAttachment-1
    Regards
    Stefan

  • My mail send defaults to wrong mail server. How do I change it?

    My mail send defaults to wrong mail server. How do I change it?

    That was a long time ago. I don't even remember asking the question. I don't have that trouble at the moment.

  • Error in mail sender channel : invalid sequence number

    Hello all,
    I'm having the following issue.
    I'm using the mail adapter to get messages from a mail server, which are attached to the mail.
    This interface is already productive, and is working fine most of the time.
    Only frequently I get the following error, which can be found in the java log.
    exception caught during processing mail message[630];
    java.io.IOException: the specified message not found: -ERR invalid sequence
    number
    This error seems only to appear when there are a lot of mails to be fetched.
    All the mail is read into PI and processed succesfully, only I also get a lot these errors.
    Does anyone know what causes this error?
    I also don't know where this sequence number is coming from, and what's the meaning of this.
    Is it possible it's trying to read the same mail more then once?
    The settings in the mail sender channel are:
    - transport protocol : POP3
    - message protocol : XIPAYLOAD
    - Use mail package : enabled
    - content encoding : none
    - Keep attachments : enabled
    - QOS : exactly once
    - Set adapter specific message attibutes : enabled
    The PI version is 7.01
    Thanks a lot in advance for the replies on this question.
    Kind regards,
    Marco van Iersel

    Hi
    Well we have used it with POP3 and it is working in the way as it should be.
    This feature is recommended  by sap when the number of emails to be read is large.
    You can set this additional parameter to restrict the number of mails fetched by sender mail adapter in one polling interval.
    Sometimes the mailbox configured for the sender mail adapter contains large number of unread mails, which exceeds the average expected number of mails in one polling interval. In such a case, processing of all the unread mails in the same polling interval by sender mail adapter degrades the system performance. To avoid this, set value of this parameter to the maximum number of mails to be fetched and processed in one polling interval. The remaining mails exceeding the limit would be processed in the next polling interval.
    That's why I have asked you to give it a try.

  • Mail Sender Adapter - Reading multipel attachments

    Hi,
    I have a scenario like reading mutiple attachment files from a mail server. Based on the attachment type, i have to call RFC or File adapter. I am able to read a single attached file from mail, but could not able to read multiple files. If any one has implemented such a scenario, please let me know.
    I have another question , is it possible to read the name of the attached file dynamically. i saw lot of examples and in forums all are telling about hardcode the attched file name in the parameter key value properties under Module tab. Without hardcode the file name , how to read the attached file from mail.
    I appreceate the help.
    Thanks,
    Manas

    Hi !
    check this out:
    Is it a way to read Multiple Attachment and send all     - Mail Sender?
    sender mail adapter - attachment name
    Regards,
    Matias.

  • Mail Sender Adapter - read from public folder.

    Hello Experts.
    I have a scenario, where I need to read an incoming mail from a public folder, and after mapping the attachment (which is a csv) I need to put the result as a file in a shared folder.
    right now the problem is, I am not sure how to access the public folder.
    should I use one of the exchange users, and try to access the public folder?
    what should I be writing in the URL parameter in the mail sender adapter ? (imap://server/???/public folder ?)
    Also - in case I will want to switch the location of the mail to a private foler inside of the user mailbox - what is the URL parameter in that case?
    Anyone ever did something like this and can help?
    Thanks,
    Imanuel Rahamim.

    Hi Imanuel,
    do u mean u want to pick the mail which contains an attachement from a specified folder instead of inbox?
    u can configure the URL like imap://host:port/path/PublicFolder.
    after PI received the mail. we can use PayloadSwapBean to get the attachement payload and do following message mapping.
    ur question: Also - in case I will want to switch the location of the mail to a private foler inside of the user mailbox - what is the URL parameter in that case?
    do u mean u want to pick the mail from a specified mail account? if like this, create an user for the interface only. then configure the UserName/Password in the channel.
    Regards,
    Kevin Song

  • Transport protocol SMTP in Mail Sender Adapter

    Hi Experts,
    How can I use SMTP as the Transport Protocol instead of POP3 / IMAP4 protocols in the Mail Sender Adapter.
    I am referring Note 856599 - FAQ Mail Adapter.pdf but not getting a l
    " 9. Other Questions
    Q: How can I configure my sender channel for my SMTP server?
    A: You can specify your SMTP server as URL. For example, if your
    server is called host, your URL should look like
    smtp://host:port/ "
    Regards,
    Shobhit

    Hi
    How can I use SMTP as the Transport Protocol instead of POP3 / IMAP4 protocols in the Mail Sender Adapter.
    In case of sending mail from XI you can use SMTP. To read mails you need POP3
    IMAP works for both.
    Yes in XI mail adapter receiver type. URL field you can use URL like
    SMTP://Mailhost.com
    Refer this
    The specified item was not found.
    Thanks
    Gaurav

Maybe you are looking for

  • Imported Archieves

    Hi Experts 1.What is the use of Imported Archieves..? It is used in mapping...? 2.How to create an UDF? Thanks in Advance..

  • ITunes crashes without Bonjour

    I installed iTunes 11 this morning (iTunes64 for Windows 7 x64).  After installing, I removed Bonjour.  I do not wish to have Bonjour installed (this point is not negotiable).  After removing Bonjour, I find that iTunes crashes immediately after star

  • Function modules in Update task

    Hi Folks, What is the difference between 1.If a function module contains in attributes 'Update mode ' and run( without 'update task - keyword). 2.call function ' fun2' in update task. In this case, do we need to set the attributes must be 'Update tas

  • Create Records through OData using Jquery

    Hi All, I have created a OData Service in SAP ECC system in format http://hostname:portno/sap/opu/odata/sap/Z_PORDER_SRV/PurchaseOrderHeaderCollection I am trying to create a record from front end using JQuery.   I am able to retrieve all the records

  • Change defaults on guest account

    Hi. I've been searching for this answer for a couple of hours now. And the only tricks i've found was to old i think. (from 2008-2011) I want to change the default settings on my guest account. The dock, startpage on safari, background and so on. I h