Send Email With Attachment And Recordset Recipients

When I try to send an email with an uploaded attachment, then attach it to the email being sent out to a recordset, my server tells me it has exhausted all its memory to send out the file. The pdf is 10 megs and the amount of ram allowed to be used is 256 megs.
The problem is that it seems to be that the way in which it is goign about sending the email to a recordset is that, it combines the attachment for all the email address. So say i have 35 people in the recordset with a 10 meg pdf, turns into 350 of ram.
Has anyone had any experience with this?

Consider using UTL_MAIL package:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_mail.htm
(Note: it's not installed and configured by default, but the scripts are supplied with the Oracle database, see documentation for instructions)

Similar Messages

  • Send mail with attachment and more recipients

    Hi to all,
    I have this procedure :
    PROCEDURE SPEDISCI_MAIL
    Mittente IN VARCHAR2,
    Destinatario IN VARCHAR2,
    Oggetto IN VARCHAR2,
    Messaggio IN VARCHAR2
    IS
    mailhost VARCHAR2(40) := 'pippo.com';
    conn utl_smtp.connection;
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    mesg VARCHAR2( 1000 );
    local_mittente VARCHAR2(2000) := mittente;
    BEGIN
    conn := utl_smtp.open_connection (mailhost,25);
    mesg:='Date:'||TO_CHAR(SYSDATE,'dd mon yy hh24:mi:ss')||crlf||
    'From:<'||mittente||'>'||crlf||
    'Subject:'||Oggetto||crlf||
    'To:'||destinatario||crlf||''
    ||crlf||messaggio;
    utl_smtp.helo(conn, mailhost);
    utl_smtp.mail(conn,local_mittente);
    utl_smtp.rcpt(conn,destinatario);
    utl_smtp.data(conn, mesg);
    utl_smtp.quit(conn);
    END;
    Can I send mail with attachment and more recipients?
    Thank you
    Silvia

    Consider using UTL_MAIL package:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_mail.htm
    (Note: it's not installed and configured by default, but the scripts are supplied with the Oracle database, see documentation for instructions)

  • Send email with Attachment and Message in Body

    Hi All,
    I'm sending an email (Receiver Email Adapter) with a Zipped CSV file as an attachment. I used the following modules to achieve this.
    1     localejbs/AF_Modules/StrictXml2PlainBean                          Local Enterprise Bean     strict2plain
    2     localejbs/AF_Modules/MessageTransformBean                          Local Enterprise Bean     contentType
    3     localejbs/AF_Modules/TextCodepageConversionBean     Local Enterprise Bean     Transform
    4     localejbs/AF_Modules/PayloadZipBean                                               Local Enterprise Bean     zip
    5     sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean     Local Enterprise Bean     mail
    Transform     Conversion.charset     ISO-8859-1
    contentType     Transform.ContentDispostion     attachment;
    contentType     Transform.ContentType     text/plain;charset="UTF-8";name="Attachment.csv"
    contentType     Transform.Description     file
    strict2plain     DATA.endSeparator     \r\n
    strict2plain     DATA.fieldSeparator     ,
    strict2plain     fieldNames     Result
    strict2plain     recordTypes     DATA
    zip     zip.filenameKey     contentType
    zip     zip.mode     zipAll
    My problem now is how to put text content in the body? Please help.

    > My problem now is how to put text content in the body? Please help.
    This is not possible with standard.
    You have to write an adapter module for this.

  • How i can send email with attachment ?

    any body can help me ..............??????????????????

    Hello,
    please, use "Search" utility in the forum before ask something like this...
    I've just tried with :
    "send email with attachment"
    and ... you have the solution in the first result...
    Regards,
    Jose.

  • Sending Mail with attachment and preserving the order of attachment

    Hi Everyone!!!!!!
    My requirement is to send Email with attachment in the same order as they were attached by Sender while composing the mail. I want to preserve order of attachment in the mail and when receiver open a mail, the attached files should be reflected in same order as it was on sender side. In my application,the documents being upload are already in my database. So, user just requires to mark the corresponding check box and enter the Sequence number for each attachment. When he clicks on "SEND" button, the Source file is first written from database to OS level and then files are attached from source available on OS . The attached file name could be anything. Based on the Sequence number file should be attached and send. My current code works fine,but problem it is that the Sequence number is not preserved in my attachment . However, when I traced the output of FOR Loop by inserting it in a table " temp_trace" I found that the Sequence is preserved in the order that I want. So, I think that uploaded files are written on the Operating system in same order but they are not attached in same order. Below is the sample code that is I am using to attach file in email. Here, the user_sequence is the sequence number entered by user.
    for i in (select case when user_sequence is not null
    then trim(to_char(user_sequence ,'09'))||'_'||file_name||'.pdf'
    else ||'_'||file_name||'.pdf' end file_name ,
    file_src,length(file_src) len,cd.doc_id,PRIORITY from
    MIM_CLIENT_DOCS CD,(select DOC_ID ,user_sequence from table P_DOC_AND_user_sequence ) TEMP_TAB
    WHERE CD.DOC_ID = TEMP_TAB.DOC_ID order by case when user_sequence is null then 1 else 0 end, file_name)
    loop
    insert into temp_trace values(i.file_name);
    L_OUT := UTL_FILE.FOPEN(v_oracle_dir,i.file_name,'wb',32760);
    end loop;
    I want my output as
    1_first attachment.txt
    2_second_attachment.docx
    3_abc.sql
    _xxx.txt  ------------------ When sequence is not assigned by user That is null at last.
    Unfortunately, I am not getting attachment in mail in this sequence. Can anyone give me suggestion.
    Sorry for stuff essay and thanks in advance!!!!!!!!!!!

    >
    Please update your forum profile with a real handle instead of "974850".
    My requirement is to send Email with attachment in the same order as they were attached by Sender while composing the mail. I want to preserve order of attachment in the mail and when receiver open a mail, the attached files should be reflected in same order as it was on sender side. In my application,the documents being upload are already in my database. So, user just requires to mark the corresponding check box and enter the Sequence number for each attachment. When he clicks on "SEND" button, the Source file is first written from database to OS level and then files are attached from source available on OS . The attached file name could be anything. Based on the Sequence number file should be attached and send. My current code works fine,but problem it is that the Sequence number is not preserved in my attachment . However, when I traced the output of FOR Loop by inserting it in a table " temp_trace" I found that the Sequence is preserved in the order that I want. So, I think that uploaded files are written on the Operating system in same order but they are not attached in same order. Below is the sample code that is I am using to attach file in email. Here, the user_sequence is the sequence number entered by user.Always post code using <tt>\...\</tt> tags as described in the FAQ.
    for i in (select case when  user_sequence is not null
    then trim(to_char(user_sequence ,'09'))||'_'||file_name||'.pdf'
    else  ||'_'||file_name||'.pdf' end file_name ,
    file_src,length(file_src) len,cd.doc_id,PRIORITY from
    MIM_CLIENT_DOCS CD,(select DOC_ID ,user_sequence from table P_DOC_AND_user_sequence ) TEMP_TAB
    WHERE CD.DOC_ID = TEMP_TAB.DOC_ID order by case when user_sequence is null then 1 else 0 end, file_name)                               
    loop
    insert into temp_trace values(i.file_name);
    L_OUT := UTL_FILE.FOPEN(v_oracle_dir,i.file_name,'wb',32760);
    end loop;I want my output as
    1_first attachment.txt
    2_second_attachment.docx
    3_abc.sql
    _xxx.txt  ------------------ When sequence is not assigned by user That is null at last.
    Unfortunately, I am not getting attachment in mail in this sequence. Can anyone give me suggestion.I see no code that attaches anything to email messages. What code is used to do this? Why are the files being written to the file system?

  • Sending email with attachment (image)

    Is there any way or workaround to send emails with attachments? The only way known to me is to use mailto but how to include attachment then? Has anyone tried to do that with native extensions on iOS?

    Maybe someone experienced in ObjectiveC could support the community and write a native extension for sending email with attachments and post it here: http://www.adobe.com/devnet/air/native-extensions-for-air.html

  • Sending email with attachment from iCloud

    when i am sending email with attachment, when i am sending email with attachment I found that the mail was send and still on draft on the client software on my mac book pro. Any solution please??

    That happens at times.  Don't know why.  Just delete the email in the drafts folder, as long as you are sure it was sent (check the sent folder).  I've wondered whether it's a timing issue.

  • Send Email with Attachment Callable Object

    Hello,
    I have a GP Application where i have 2 steps....in the first action the initiator attaches a document through standard GP functionality......i want to send this attachment to the approver alongwith the email i am already sending using 'Send email with Attachment (optional)' callable obejct.....how can i implement this....?
    Any help would be highly appreciated.
    Regards,
    Anil

    Hello Anil!
    Well, if i really undestand your question, i think you resolve it using callable object mail with attachment, you said that do it, so, you only need to configure your smtp on youser server and you don´t need more work.
    Please write any doubts.

  • Send Email with Attachment in BSP?

    Hello,
         I have trouble about sending Email in BSP .
         I don't know how to <b>Send Email with attachment in BSP</b> . Please give me some advice .
        Thank you very much!

    Here is a sample application..
    <b>Layout</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="Send Mail with Attachment " >
        <htmlb:form id           = "form1"
                    encodingType = "multipart/form-data" >
          <htmlb:label for  = "MAILTO"
                       text = "Mail to" />
          <htmlb:inputField id    = "MAILTO"
                            size  = "20"
                            value = "<%= mail_to %>"
                            type  = "string" />
          <htmlb:fileUpload id          = "myUpload"
                            onUpload    = "HandleUpload"
                            upload_text = "Attach"
                            size        = "90" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>Page attributes:</b>
    mail_to     TYPE     ADR6-SMTP_ADDR     E-Mail Address
    <b> Event handler OnInputprocessing..</b>
    DATA: fileUpload TYPE REF TO CL_HTMLB_FILEUPLOAD,
          file_content TYPE XSTRING,
          file_length TYPE STRING,
          file_mime_type TYPE STRING,
          file_name TYPE STRING.
    fileUpload ?= CL_HTMLB_MANAGER=>GET_DATA(
                           request = request
                           id      = 'myUpload'
                           name    = 'fileUpload' ).
    if fileUpload is not INITIAL.
      file_name      = fileUpload->file_name.
      file_mime_type = fileUpload->file_content_type.
      file_length    = fileUpload->file_length.
      file_content   = fileUpload->file_content.
      mail_to = request->get_form_field( `MAILTO` ).
    * Send mail part..
      CLASS cl_bcs DEFINITION LOAD.
      DATA:
            lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
      lo_send_request = cl_bcs=>create_persistent( ).
    * Message body and subject
      DATA:
            lt_message_body TYPE bcsy_text VALUE IS INITIAL,
            lt_att_content_hex type solix_tab,
            lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
      APPEND 'Dear Vendor,' TO lt_message_body.
      append ' ' to lt_message_body.
      APPEND 'Please find the attached report.'
      TO lt_message_body.
      append ' ' to lt_message_body.
      APPEND 'Thank You,' TO lt_message_body.
      lo_document = cl_document_bcs=>create_document(
      i_type = 'RAW'
      i_text = lt_message_body
      i_subject = 'Visit report' ).
      data: data_tab type solix_tab,
      p_data type XSTRING.
    * Pass the data of the document we have uploaded..
      p_data = file_content.
      call function 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer     = p_data
        TABLES
          binary_tab = data_tab.
      DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
      TRY.
          lo_document->add_attachment(
          EXPORTING
          i_attachment_type = 'PDF'
          i_attachment_subject = 'Visit Report'
          i_att_content_hex = data_tab ).
        CATCH cx_document_bcs INTO lx_document_bcs.
      ENDTRY.
    * Add attachment
    * Pass the document to send request
      lo_send_request->set_document( lo_document ).
    * Create sender
      DATA:
      lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
      l_send type ADR6-SMTP_ADDR value '[email protected]'.
    * Set sender
      l_send = mail_to.
      lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
      lo_send_request->set_sender(
      EXPORTING
      i_sender = lo_sender ).
    * Create recipient
      DATA:
      lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
      lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
    ** Set recipient
      lo_send_request->add_recipient(
      EXPORTING
      i_recipient = lo_recipient
      i_express = 'X' ).
      lo_send_request->add_recipient(
      EXPORTING
      i_recipient = lo_recipient
      i_express = 'X' ).
    * Send email
      DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
      lo_send_request->send(
      EXPORTING
      i_with_error_screen = 'X'
      RECEIVING
      result = lv_sent_to_all ).
      COMMIT WORK.
    endif.
    Hope this will be helpful.
    Raja T

  • XI Mail Adapter: sending emails with attachment with help of java mapping

    Hi ,
    On trying out the scenerio mentioned in the blog, using the java mapping provided
    "XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    The scenerio works just fine.
    But the payload as the content of the attachment is not getting generated in proper XML format.
    I suppose it's because of the replace special characters code part..
    Can anyone help me state the modification required in the code.
    Thanks!
    Regards,
    Faria Mithani

    It might be a codepage issue. Is your original payload UTF-8?

  • Sharepoint Online - Send email with attachment

    Hi All,
    is there some way how to send email with attachment, which is attached to list item in host web?
    I tried some of solutions but none of them not working.
    Server side:
    For example event receiver after added list item with attachment - Because it is office 365, in SandBox solution I can´t use SmtpClient class.
    Any other ideas?
    Client side:
    For example client web part with REST call. It works fine until I don´t need access to attachment.
    string oDataUrlAttach = "/_api/Web/lists/getbytitle('ListName')/Items(6)/AttachmentFiles('Document.docx')/$value";
                HttpWebRequest itemRequestAttach = (HttpWebRequest)HttpWebRequest.Create(sharepointUrl.ToString() + oDataUrlAttach);
                itemRequest.Method = "GET";
                itemRequest.Accept = "application/atom+xml";
                itemRequest.ContentType = "application/atom+xml;type=entry";
                itemRequest.Headers.Add("Authorization", "Bearer " + accessToken);
                HttpWebResponse itemResponseAttach = (HttpWebResponse)itemRequestAttach.GetResponse();
    Here I get error: The remote server returned an error: (403) Forbidden.
    But other calls are OK. I can get all items from my list except attachments.
    Any ideas?
    Thank you.

    Why hasn't this been answered?
    Sam Ogle

  • When I send emails with photos from iPhoto recipients often tell me images are upside down.  What would cause that?

    When I send emails with photos from iPhoto recipients often tell me images are upside down.  What would cause that?

    Found this :
    https://discussions.apple.com/thread/3431867?start=0&tstart=0
    by doing this :
    http://www.google.com/search?q=images+are+upside+down+ios

  • How to send Email with Cc and Bcc using MailPackage

    Hi ,
    we are using Mail Package to send the Email using Mail Adapter.We have a requirement where we need to send Email with Cc and Bcc using Mail Package .
    Can we send Cc and Bcc using Mail Package ?
    Thanks
    Rajesh .

    HI Rajesh,
    There is a standard structure for Receiver Mail adopter which we can get from SAP market Place but it is not provided with CC if u want to use CC then you have to go with Dynamic Configuration.
    DynamicConfiguration configuration = (DynamicConfiguration) container.getTransformationParameters().getStreamTransformationConstants.DYNAMIC_CONFIGURATION);
    /*any other required fields*/
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail", "THeaderCC");
    configuration.put(key, "ccemail @ test.com");
    Regards
    Praveen Reddy
    Edited by: Maareddy Praveen Reddy on Aug 10, 2011 12:17 PM

  • BPEL send email with attachment

    Hi guys,,
    Now i want to send email with attachment from the bpel console. In bpel console, if i want to use, "browse" button, how can i create this button in my xsd file?

    Hello,
    Well I'm using the BPEL build in decoder. It works for txt file but how about PDF? Will it be the same?
    it give me this message in the email process.
    XML Parsing Error: reference to invalid character number
    p/s: it working to txt but not pdf.
    below is the script
    <bpelx:exec name="decoder" language="java" version="1.5">
    <![CDATA[String inputString = new String();
                inputString =(String)getVariableData("attachmentContentVar");  
        try {
                String decoded = Base64Decoder.decode(inputString);  
                setVariableData("decoded",decoded); 
    catch(Exception e)
    e.printStackTrace();
    }]]>
    </bpelx:exec>
    <copy>
    <from variable="retriveAttachment_retriveAttachmentSelect_TASKID_OutputVariable"
    part="WfattachmentCollection"
    query="/ns3:WfattachmentCollection/ns3:Wfattachment/ns3:encoding"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:Content/ns1:ContentBody/ns1:MultiPart/ns1:BodyPart[2]/ns1:MimeType"/>
    </copy>
    <copy>
    <from variable="retriveAttachment_retriveAttachmentSelect_TASKID_OutputVariable"
    part="WfattachmentCollection"
    query="/ns3:WfattachmentCollection/ns3:Wfattachment/ns3:name"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:Content/ns1:ContentBody/ns1:MultiPart/ns1:BodyPart[2]/ns1:BodyPartName"/>
    </copy>
    <copy>
    <from expression="bpws:getVariableData('decoded')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:Content/ns1:ContentBody/ns1:MultiPart/ns1:BodyPart[2]/ns1:ContentBody"/>
    </copy>
    </assign>
    Edited by: kpchong on Oct 20, 2009 12:00 AM

  • Send Email with attachment further .

    Hello All,
          Thank Raja Thangamani for giving me an answer about <b>Send Email with attachment</b>  . But now I have a new question that when I sene Email with attachment beyond 500M , this funtion is not applied .
          Pls give me some advice! Thanks very much!

    Look at this link & thread..
    http://www.thespot4sap.com/Articles/SAP_Mail_UNIX_Example_ABAP.asp
    Send PDF Attachment to SAP Mail Inbox.
    Hope this will solve your problem.
    Raja T
    Message was edited by:
            Raja Thangamani

Maybe you are looking for

  • Drag and Drop in DataGrid/Advanced DataGrid

    Hi All, Here is the scenario, assume that i have some 10 records in DataGrid/Advanced DataGrid .I have selected 4th record and when i try to drag the selected item to down, i should be able to drag all the records one step down from the selected reco

  • Qosmio G35 - Display not coming on at boot up

    I recently was trying to increase start up speed by getting rid of things I didn't think I needed running. Now when I boot my Qosmio G35 I have to hit the FN F5 keys to see anything on the screen? And when I got home I couldn't get it to extend the s

  • Right mouse click on field

    Hi All, I'm looking for a way to add a menuitem to the popup menu that you get if you right click on a field on a form. (SBO 8.81) I don't need the exact code, but I don't now which objects to use for this. Can anyone help me? Tnx! Sebastiaan

  • Why is the template binding not refreshing?

    I made this itemtemplate for a combobox: <DataTemplate x:Key="EO_CategoryItemTemplate"> <Grid> <Line Stroke="Gray" StrokeThickness="1" VerticalAlignment="Center" X1="0" X2="{Binding ActualWidth, ElementName=cat1}" Visibility="{Binding Active, Convert

  • How to set default value to relationship filed(ess~my~fam)new child

    Hi Experts, i have a standard ESS Application for Family members/dependents for Malaysia(essmyfam)-->New child When i click on new child a view gets opened withcontains relationship field with dropdown.Kdsvh is the field that is binded to dropdown.By