Send an email with multiple attachments

Hi all

Thanks for any help in advance.

I'm writing a procedure that will seek mutiple selected documents that are saved in a report. The part I'm having the problem is how to pass only the documents that have been selected by the box for the procedure. I have the document with instructions on how to add multiple documents to a table, but not when selected in a checkbox control.

Thanks again for any help.

With this application in mind, a process page on submit the following should do the trick:

DECLARE
     v_apex_id NUMBER;
     v_blob BLOB;
     v_filename varchar2(50);
     v_mimetype varchar2(50);
BEGIN

     v_apex_id := APEX_MAIL(
                    p_to       => '[email protected]',   -- change to your email address
                    p_from     => '[email protected]', -- change to a real senders email address
                    p_body     => 'message body',
                    p_subj     => 'Attach images and send');

     for i in 1..APEX_APPLICATION.g_f02.COUNT LOOP

          select filename, mimetype, content into v_filename, v_mimetype, v_blob
          from emp_ecm_documents
          where id = apex_application.g_f02(i);

          APEX_MAIL.ADD_ATTACHMENT(
               p_mail_id    => v_apex_id,
               p_attachment => v_blob,
               p_filename   => v_filename,
               p_mime_type  => v_mimetype);

     END LOOP;

     APEX_MAIL.PUSH_QUEUE;

END;

API is used:

APEX_MAIL: http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_mail.htm#CIHDIEJI
APEX_APPLICATION: http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_app.htm#insertedID2

Van
Trent

Tags: Database

Similar Questions

  • Sending Email with multiple attachments using packages

    Hi all

    Version: 10.2.0

    I am trying to send mail with multiple attachments using packages.

    I tried to use Mail_tools which is in http://www.myoracleportal.com/

    But I can send with only one attachment. Are there other options which i it allows to send with multiple attachments.

    I have bad do I send attachments Jasper instance < < converted to bytes > >.

    Please advice...

    TIA,

    My dear friend,

    If you are looking for in this forum - you can get it.

    Have you checked the forum?

    Anyway,.

    Here's the starter for you->

    http://forums.Oracle.com/forums/search.jspa?threadID=&q=sending+email+with+multiple+attachments+using+packages++&objid=F75&DateRange=last90days&NumResults=15

    Kind regards.

    LOULOU.

  • Email with multiple attachments using ADF Mobile

    Hello

    I want to send multiple attachments using ADF Mobile, using Jdeveloper version 11.1.2.3.0

    looking at the signature of the method below sendEmail(), attachments param looks as String

    DeviceManagerFactory.getDeviceManager (.sendEmail)
    java.lang.String to
    java.lang.String cc
    java.lang.String subject
    java.lang.String body
    java.lang.String bcc
    spare java.lang.String
    java.lang.String mimeTypes)

    Is multiple attachments supported in the ADF Mobile? If so, please suggest how to achieve this scenario.

    -Deepak

    Deepak,

    You can attach multiple files as string separated by commas (paths).

    Ex: http://technology.amis.nl/2012/12/27/adf-mobile-device-interaction-api-pictures-gps-and-email-with-attachments/

    Ref: http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/amxbinding.htm

    Arun-

  • Windows Mail: cannot send an email with 2 attachments with the file size 393KO and 345 KB

    I'm a Representaive Service Microsoft client displaying a number on behalf of the client. Details in the following way:

    Customer problem: "my windows mail won't allow mw email with parts 2 attachments 1 @ 393kb and the other 345kb... why? I sent the same 2 files on August 7 and now it runs out.  Everything goes through Yahoo... it's my problem. "

    See here and the section called WinMail: www.oehelp.com/OETips.aspx#3 it will not harm the user to compact and repair the database either, because sometimes this resolves things (see www.oehelp.com/WMUtil/).  Also other attachments (images, etc.) that are smaller can be sent well?  It can test by sending an e-mail to himself through this account.

    Steve

  • Windows Live mail problem when sending an email with picture multiple attachments (.jpg)

    Last week, I sent an email with attachments of two photo. This was not enough and I got 5 separate messages, advising me of non-delivery, but also the original message had not been saved in my "sent" folder

    Today, I sent two e-mails with multiple attachments photos and the recipient received the first email 46 times but with only the subject line, no message and no attachments. He received the second e-mail 26 times again with only the subject line (this one not included in my folder "sent" Although previous email did).

    The recipient today is different from the one I sent last week.

    All other messages recently, including those with no photographic attachments seem to have been given normally and are displayed in my "sent" folder Some recipients responded to these so I know they arrived OK.

    Any ideas on what is causing the problem and how to solve this problem?

    Right click on the name of the account above the Inbox. Properties | Advanced and uncheck 'Break apart messages... ". ». That will solve the multiple copies with no photo.

  • Cannot send emails with photo attachments using the Hotmail account.

    Original title: Hotmail account

    I can't send emails with photo attachments, why? I can send emails without a photo accessory.

    Thank you.

    Hi Keith,

    1 are you facing the issue only when you use the Mail application to send photo attachments?

    2. the problem occurs with all the accessories of the photo?

    3. is this problem only happens with Hotmail account?

    4. you receive messages or error codes?

    5 did you a recent software or changes to the material on the computer?

    This problem can occur if the account is not properly synchronized with Mail app or due to problems with the file format of the attachment of the photo you want to send.

    Method 1:

    You can try the steps to run the troubleshooter of app, synchronize licenses, update the Windows store, and also check for Windows updates.

    What to do if you have problems with a soft

    Note: The above article contains steps to change Windows Firewall settings. Make sure that the Windows Firewall is enabled after checking the issue.

    Method 2:

    If you have installed a third-party security software, you can temporarily disable third-party security software and firewalls installed on the system and check if you can send.

    Note: Be sure to enable the security software on the computer after checking the issue.

    You can also check if you can send the photo attachment using Hotmail like webmail account.

    Hope the helps of information. Let us know if you need help with Windows related issues. We will be happy to help you.

  • I use different e-mail accounts: I send an email with the sender A (standard!), email is archived to the sender sent archive and the email is sent to the sender, B

    A really strange problem!

    I use different e-mail accounts. I send an email with a sender (defined as standard!), email is archived in archive A sent from the sender, the sender is wrote in the header of the email as the sender, but the email is sent with the sender B written as the sender in the email received.

    Best regards, Michael

    It sounds like you do not use the right smtp server to send the e-mail.

    Please check what 'Sender A' smtp server account uses.
    'Tools' > 'Account settings' for the e-mail account
    or
    Right click on the email account in the folders pane, and then select "settings".
    Lower-right - outgoing (SMTP) server - select the correct SMTP server for that e-mail account.
    See the image below as an aid.
    Click OK

    If you are unsure about what to do please post the following information:

    In Thunderbird

    • Help > troubleshooting information
    • Click on 'copy text to the Clipboard.
    • In the forum, in this issue, right-click in a text box ' Post a reply ' and choose 'paste '.

    Tell me the number of the account which is "sender."
    Tell me the number of the account how recipient sees as venues.

  • How to send an email to multiple recipients and keep the list future emails?

    How can I send an email to multiple recipients and store the names of future emails?

    Are you using an e-mail application to send and receive your emails?

  • Since the upgrade to 31.1.0, I can't send an email with an attachment. I'm under OpenSuse 13.1 on KDE. How can I fix?

    If I try to send an email with an attachment or a picture inserted, it starts to send with a progress bar that will read a 80 to 95% completion and then stay there until it times out after a few minutes. I get this error: failed to send the message.
    The message cannot be sent because the connection to the server of SMTP outgoing.verizon.net expired. Try again or contact your network administrator.
    I use the same provider of e-mail for several years. This works for emails of simple texts without problem. If I try to transfer or to respond to an email, I get the same error.
    How can I fix?

    Thank you

    Robert

    OK, I thought about it. As I was going through the configuration editor, I saw the outgoing server settings. It made me wonder if something had changed. I went to my provider and reinforced through their list and found where mine differ. If the update for thunderbird changed something or verizon changed something.
    Thanks for the comments.

  • When I send an email with an attachment, the recipient cannot open it.

    I TRY to SEND YEAR EMAIL WITH AN ATTACHMENT OF THE WORD or PIECE WORK. THE PERSON RECEIVING THE MAIL CANNOT USE THE FORMAT AND THE APPLICATION TO BE CONVERTED TO PDF. HOW DO I DO THAT?

    Open the docunent in Word and save it as a PDF file.
     
    The Applications Microsoft Office forums
    http://answers.Microsoft.com/en-us/Office
  • I tried to send an email with attachment and without attachment and received the "windows live Hotmail was not able to complete this application. "Microsoft may contact you about problems that report you.

    I tried to send an email with attachment and without attachment and received the error "windows live Hotmail was not able to complete this application. "Microsoft may contact you about problems that report you.

    Hi AbdiNur,

    This forum is for comments on the Microsoft Answers site.  As your question is on Hotmail, I recommend posting your question on the forums for Hotmail:

    http://www.windowslivehelp.com/forums.aspx?ProductID=1

    Thank you for using Microsoft Answers!

  • Why, when I try to send or to send an email with an attachment I get the error message "Attachment Id has wrong format"... ?

    Why, when I try to send or to send an email with an attachment I get the error message "Attachment Id has wrong format"... ?

    Hi AndyHolman,

    ·         What email program are you using?

    ·         What is the attachment file extension?

    Try to remove your automatic signature in your mail and see if it solves the problem.

    Please provide us with some information so that we can help you solve the problem.

    You can also contact you Email Service Provider (ESP) for assistance on the issue.

  • Cannot send/receive emails with jpg inserted or associated

    Cannot send/receive emails with jpg inserted or associated

    Although this issue has never been resolved, I will mark it as answered just to avoid the issue of cluttering the site.

    Dave

  • Send an email with an attachment image

    trying to send an email with a picture of an attachment but I'm not able to open the image sideways recipient - he says that the image is corrupted

    any help would be appreciated!

    Here is the code:

    public static void sendEmailWithAttachment(String to, String subject, Bitmap image) {           //create a multipart            Multipart mp = new Multipart();         //data for the content of the file          //String fileData = "just a simple test";          //String messageData = "Mail Attachment Demo";          PNGEncoder encoder = new PNGEncoder(image, true);           byte[] b = null;            try {               b = encoder.encode(true);           } catch (IOException e1) {              // TODO Auto-generated catch block              e1.printStackTrace();           }           SupportedAttachmentPart sap = new SupportedAttachmentPart(mp,"image/png","x-rimdeviceimage.png",b);         /*TextBodyPart tbp = new TextBodyPart(mp,"Send Image");         //add the file to the multipart         mp.addBodyPart(tbp);*/          mp.addBodyPart(sap);            //create a message in the sent items folder         Folder folders[] = Session.getDefaultInstance().getStore().list(Folder.SENT);           Message message = new Message(folders[0]);          //add recipients to the message and send            try {                Address toAdd = new Address(to,to);                 Address toAdds[] = new Address[1];              toAdds[0] = toAdd;              message.addRecipients(Message.RecipientType.TO,toAdds);                 message.setContent(mp);                 message.setSubject(subject);                Transport.send(message);                Dialog.inform("Card was sent to " +to);            } catch (Exception e) {              Dialog.inform(e.toString());           }       } 
    

    I could send it properly after the conversion of the image in JPEG format

    JPEGEncodedImage jpegImage = JPEGEncodedImage.encode(image,100);                        //data for the content of the file           SupportedAttachmentPart sap = new SupportedAttachmentPart(mp,jpegImage.getMIMEType() ,"x-rimdeviceimage.jpg",jpegImage.getData() );
    
  • How to send an email with the link that has the user id?

    Hello everyone, I'm trying to send an email with the link that includes the user id. After users click the link, they should be able to see the form with their information that has been previously fulfilled. So my question is after I have send email how and what is the best way to get information and show it to the user. What should be separate page with the cfquery limited on the id user or something else? If anyone has an idea of what is the best way to do it please let me know. I already have my code who send e-mails.

    You save all the fields submitted initially to a database?  If so, run a query and then convert them to the form field, query values. I don't know what looks like your data (or database), but a simplified version might look like this.

    SELECT FirstName

    OF SavedFormTable

    WHERE ID =

Maybe you are looking for

  • Satellite L20-199: System cannot identify WLAN card

    Hello I have a L20-199 with LAN wireless satellite. But the system cannot identify the (hardware) wireless network card. Trying to install Intell WLAN driver on the site of Toshiba relevent also impossible to locate a WLAN card. How to install or ide

  • X 240 display type

    Hello I'm looking for a guy for help here. I think to buy a laptop to a person and he gave me the model number and serial number, but I can't find any information about x 240 laptop specifications. Especially I'm interesting in the view type that I w

  • Apparently the login screen does not work...

    I run windows 7. When starting, I get to the login screen. I can move the mouse, but nothing is clickable. The text box seems to have a cursor fixed (not flashing). So I suspect it's maybe an image, but I am not sure. Any help would be appreciated. I

  • Cannot update and download programs

    Summer trying to update and download programs, but every time I get a message saying unable to connect to the server. Simple thing, I guess, but I don't know what to do?

  • Elements of 6 does not upgrade Windows 7 to 10

    I upgraded to Windows 7 (with Elements 6) to Windows 10, but the Organizer in elements now does not open.   I can edit, but not organize - I have to close the program.   I get a message saying that I need Direct Play - why?   Can it be fixed or shoul