Modifying Name of XML E-Mail Attachment

Hey all
I need to know how I can change the name of the xml-attachment using the submit function.
My current code looks as follows:
<event activity="click" name="event_click">
<submit format="xml" target="mailto:[email protected]?subject=test&body=text" textEncoding="UTF-8">
</event>
Currently the attached xml-file is automatically named “filename_Daten.xml”.
The goal is to generate the filename dynamically depending on certain values.
Thanks for helping me.

As far as i know you can't change the File name using Adobe scripts; however it is possible if you submit the form to a server-side script such as ASP.net, that can parse the submission data and inject it into an SMTP message.
For online examples:
http://www.pdfemail.net/examples/

Similar Messages

  • How to send incoming XML as mail-attachment

    Hi Experts,
    I have the following scenario: an incoming XML-file should be send as attachment of a mail. Now, I have defined incoming message with the structure of the xml-message and outgoing message as mail-package. In the message mapping I fill the nessesary mail-fields. In my receiver comm.channel (mailadapter) I checked "Use mail package" and "Keep attachment".
    Result is that the mail is created and send ok, but without attachment....what am I doing wrong here?
    Regards,
    William

    Hi JWD,
    You should configure the mail adapter with 'use the mail adpater' and 'keep attachments'.
    Create an XML file conform the XML structure provide by SAP
    The mail package should look like this:
    <?xml version="1.0" encoding="utf-8"?>
    <ns:MT_Mail_Sent xmlns:xi="http://sap.com/xi/XI/Mail/30">
    <xi:Mail>
    <Subject>Item</Subject>
    <From>MAIL ADDRESS</From>
    <To>MAIL ADRESS</To>
    <Content_Type>multipart/mixed; boundary="AaBb--984dfgeSSd3532"</Content_Type>
    <Content_Disposition>attachment</Content_Disposition>
    <Content>
    AaBb984dfgeSSd3532
    Content-Type: text/plain
    this is sample data.
    AaBb984dfgeSSd3532
    Content-Type: text/plain;name="CSV_data.csv"
    Order number;Item number;description<xsl:text> </xsl:text>
    <xsl:for-each select="Article_line">
    <xsl:value-of select="Ord_nmbr"/>;<xsl:value-of select="Item_nmbr"/>;<xsl:value-of select="Description<xsl:text>
    </xsl:text></xsl:for-each>
    AaBb984dfgeSSd3532
    Content-Type: text/plain;name="TXT_data.txt"
    Order number;Item number;description<xsl:text> </xsl:text>
    <xsl:for-each select="Article_line">
    <xsl:value-of select="Ord_nmbr"/>;<xsl:value-of select="Item_nmbr"/>;<xsl:value-of select="Description<xsl:text> </xsl:text></xsl:for-each>
    AaBb984dfgeSSd3532
    </Content>
    </xi:Mail>
    </ns:MT_Mail_Sent>
    In the above example you should have some content and 2 attachments (1 csv file and 1 txt file).
    After each break (AaBb984dfgeSSd3532) specify again the 'Content-Type'.
    *When you want to send a message payload as described, you have to set in the mail receiver channel the parameter Content Encoding to None and uncheck Keep Attachments.
    The last boundary AaBb984dfgeSSd3532 should be omitted, as the mail adapter sets that border itself (tested with SP16)*
    Reward points if this helps
    Regards
    Pragathi.

  • How to keep the new modified name when sendind through Mail?

    Is there any way to keep the name I just modified in iPhoto when I send it via Mail directly from iPhoto?
    I just tried and I see the original dscxxx name in the received email!
    Thanks

    nicohus
    in a word, no.
    But in the dialogue box that you get when you click the email button tick Include Titles and the email will have the Title attached to file, without renaming it. If you want the titles to become your File Names the only way to do this is to export the files from iPhoto, using the File -> Export -> Name: Use Title command, and then re-import the files to iPhoto.
    Regards
    TD

  • Send XML File as attachement in Mail Receiver adapter

    Hi all,
    i have the following scenario. i would like to read an XML file from the file system and send this file as an attachement of a mail to a mail receiver specified in this file.
    i would like to fill the payload of the mail with some information from the xml file and in addition i would like to send the complete xml file as an mail attachement.
    can anybody tell me, how the mail receiver adater needs to be specified ?
    best regards,
    martin

    Hey,
    you can go for dynamic configuration of mail adapter.
    In this you need to import a mail structure.
    mail details such as to, from, subject and content of the mail are a part of the structure.
    In your ID check the Use Mail package and also keep attachments.
    Now you can give your details in mapping itself.
    whatever you want to map in the content of the mail, map it in the content field.
    also your file will behave as an attachment.
    refer to this blog.
    this is the mail structure. Import it as extenal definitions.
    <?xml version="1.0" encoding="utf-8" ?>
    <!--
    SAP takes no position regarding the validity or scope of any intellectual property or
    other rights that might be claimed to pertain to the implementation or use of the
    technology described in this document or the extent to which any license under such
    rights might or might not be available; neither does it represent that it has made any
    effort to identify any such rights.
    Copyright © SAP 2003-2004. All Rights Reserved.
    This document and translations of it may be copied and furnished to others, and derivative
    works that comment on or otherwise explain it or assist in its implementation may be
    prepared, copied, published and distributed, in whole or in part, without restriction of
    any kind, provided that the above copyright notice and this paragraph are included on all
    such copies and derivative works. However, this document itself does not be modified in
    any way, such as by removing the copyright notice or references to SAP.
    This document and the information contained herein is provided on an u201CAS ISu201D
    basis and SAP DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
    ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY
    IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
    -->
    <xs:schema targetNamespace="http://sap.com/xi/XI/Mail/30"
      xmlns:xi="http://sap.com/xi/XI/Mail/30"
      xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <!--
    Mail
      -->
      <xs:element name="Mail">
        <xs:annotation>
          <xs:documentation>Mail package for XI - Mail Adapter</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Subject" type="xs:string" minOccurs="0"/>
            <xs:element name="From" type="xs:string" minOccurs="0"/>
            <xs:element name="To" type="xs:string" minOccurs="0"/>
            <xs:element name="Reply_To" type="xs:string" minOccurs="0"/>
            <xs:element name="Content_Type" type="xs:string" minOccurs="0"/>
            <xs:element name="Date" type="xs:dateTime" minOccurs="0"/>
            <xs:element name="Message_ID" type="xs:string" minOccurs="0"/>
            <xs:element name="X_Mailer" type="xs:string" minOccurs="0"/>
            <xs:element name="Content" minOccurs="0">
              <xs:annotation>
                <xs:documentation>any type</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="encoding" type="xs:string"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="MailReceipt">
        <xs:annotation>
          <xs:documentation>Mail Receipt for XI - Mail Adaper</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Server" type="xs:string"/>
            <xs:element name="Format" type="xs:string"/>
            <xs:element name="UseMailPackage" type="xs:boolean"/>
            <xs:element name="Encoding" type="xs:string"/>
            <xs:element name="Subject" type="xs:string" minOccurs="0"/>
            <xs:element name="From" type="xs:dateTime" minOccurs="0"/>
            <xs:element name="To" type="xs:string" minOccurs="0"/>
            <xs:element name="Date" type="xs:dateTime" minOccurs="0"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    regards,
    milan

  • Java Mapping: payload as mail attachment and dynamic file name .

    Hi,
    I have written this piece of java code.
    The code includes XPATH for fetching dynamic filename and the copysource( in, out ) to copy the content of payload as mail attchment.
    The code seems to work fine, when either of the functionality is implemented.
    but when both are implemented together ie parsing for xpath then again parsing to copy payload, then it doesnt executes the latter path i.e the payload is not fetched in the attachment.
    public class MailPackage implements StreamTransformation {
      public void setParameter(Map map) {
      public void execute(InputStream in, OutputStream out)
              throws StreamTransformationException {
      String mailSubject = "test mail";
      String mailSender = "aaaaaaaa";
      String mailReceiver = "[email protected]";
      String attachmentName = null;
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = null;
      factory.setNamespaceAware(false);
    factory.setValidating(false);
         try {
              builder = factory.newDocumentBuilder();
         Document doc = null;
          doc = builder.parse(in);
              String XPATH ="/*/Invoice/InvoiceHeader/InvoiceNumber/text()";
              Node fieldValueNode = org.apache.xpath.XPathAPI.selectSingleNode(doc,XPATH);
              System.out.print(fieldValueNode);
              attachmentName = fieldValueNode.getNodeValue() +".xml";
      String boundary = "--";
      String mailContent = "This is a sample file";
      String CRLF = "\r\n";
        //     create XML structure of mail package
        String output ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
               + "<ns:Mail xmlns:ns=\"http://sap.com/xi/XI/Mail/30\">"
               + "<Subject>" + mailSubject     + "</Subject>"
               + "<From>" + mailSender     + "</From>"
               + "<To>" + mailReceiver     + "</To>"
               + "<Content_Type>multipart/mixed; boundary=\"" + boundary + "\"</Content_Type>"
               + "<Content>";
        out.write(output.getBytes());
        // create the declaration of the MIME parts
        //First part
        output = "--" + boundary + CRLF
               + "Content-Type: text/plain; charset=UTF-8" + CRLF
               + "Content-Disposition: inline" + CRLF + CRLF
               + mailContent + CRLF
        //Second part
        + "--" + boundary + CRLF
        + "Content-Type: application/xml; name=" + attachmentName + CRLF
        + "Content-Disposition: attachment; filename=" + attachmentName + CRLF + CRLF;
        out.write(output.getBytes());
        //Source is taken as attachment
        copySource(in, out);
        out.write("</Content></ns:Mail>".getBytes());
      } catch (Exception ie) {
        throw new StreamTransformationException(ie.getMessage());
    protected static void copySource(InputStream in, OutputStream out)throws IOException {
        byte[] bbuf = new byte[in.available()];
        int bblen = in.read(bbuf);
       if (!(bblen < 0)) {
          String sbuf = new String(bbuf);
           //replace all control characters with escape sequences
         sbuf = sbuf.replaceAll("&", "&amp;");
         sbuf = sbuf.replaceAll("\"", "&quot;");
         sbuf = sbuf.replaceAll("'", "&apos;");
        sbuf = sbuf.replaceAll("<", "&lt;");
        sbuf = sbuf.replaceAll(">", "&gt;");
        out.write(sbuf.getBytes());
    Povide your suggestions.

    Hi,
    This is the sample o/p that I get by opening the mail attachment using notepad.
    <?xml version="1.0" encoding="UTF-8"?>
    <InvoiceTransmission><InvoiceTransmissionHeader><InvoiceCreationDate>2008-12-03T00:00:00</InvoiceCreationDate><Version>2.0.2</Version></InvoiceTransmissionHeader><Invoice><InvoiceHeader><CustomerEntityID>LH</CustomerEntityID><IssuingEntityID>009140559</IssuingEntityID><InvoiceNumber>913353669</InvoiceNumber><InvoiceIssueDate>2008-12-03</InvoiceIssueDate><InvoiceType InvoiceTransactionType="OR">INV</InvoiceType><InvoiceDeliveryLocation>aaa</InvoiceDeliveryLocation><TaxInvoiceNumber>Not Applicable</TaxInvoiceNumber><InvoiceCurrencyCode>USD</InvoiceCurrencyCode><InvoiceTotalAmount>517174.63</InvoiceTotalAmount><InvoiceIDDetails InvoiceIDType="BT"><InvoiceIDVATRegistrationNumber>0000000000</InvoiceIDVATRegistrationNumber><InvoiceIDName1>aaaaaaaaaaaaaaa</InvoiceIDName1><InvoiceIDName2>bbbbbbHKG</InvoiceIDName2><InvoiceIDCity>ccccccccc ccccc</InvoiceIDCity><InvoiceIDCountryCode>HK</InvoiceIDCountryCode></InvoiceIDDetails><InvoiceIDDetails InvoiceIDType="II"><InvoiceIDVATRegistrationNumber>0000000000</InvoiceIDVATRegistrationNumber><InvoiceIDName1>eeeeeeee</InvoiceIDName1><InvoiceIDName2>PAY BY WIRE TRANSFER</InvoiceIDName2><InvoiceIDCity>fffffffffffffff, NA</InvoiceIDCity><InvoiceIDCustomField ID="1"><InvoiceIDCustomFieldDescription>Company Registration Number</InvoiceIDCustomFieldDescription><InvoiceIDCustomFieldValue>0000000000</InvoiceIDCustomFieldValue></InvoiceIDCustomField></InvoiceIDDetails></InvoiceHeader><SubInvoiceHeader><InvoiceLine><ItemNumber>001</ItemNumber><ItemQuantity><ItemQuantityType>IN</ItemQuantityType><ItemQuantityFlag>GR</ItemQuantityFlag><ItemQuantityQty>28134.000</ItemQuantityQty><ItemQuantityUOM>USG</ItemQuantityUOM></ItemQuantity><ItemQuantity><ItemQuantityType>DL</ItemQuantityType><ItemQuantityFlag>GR</ItemQuantityFlag><ItemQuantityQty>106498.775</ItemQuantityQty><ItemQuantityUOM>LT</ItemQuantityUOM></ItemQuantity><ItemDeliveryReferenceValue ItemDeliveryReferenceType="DTN">590365</ItemDeliveryReferenceValue><ItemDeliveryReferenceValue ItemDeliveryReferenceType="!
    ARN">DAL
    CH</ItemDeliveryReferenceValue><ItemDeliveryReferenceValue ItemDeliveryReferenceType="FNO">mmmmmmmmm</ItemDeliveryReferenceValue><ItemDeliveryLocation>pppp</ItemDeliveryLocation><ItemReferenceLocalDate
    If you notice the problem is, the undesired "exclamation mark" that gets added in some fields before the actual value.
    In the above case.. look at "ItemDeliveryReferenceType="! ARN">DAL"
    the exclamation mark before value "ARN is unwanted, which leads to improper XML formation.
    Cant figure out why is this coming.
    Regards,
    Faria Mithani

  • How to set dynamic name of the mail attachment according to source file ?

    Hi,gurus:
    Our scenario is like below:
    Sending files from an FTP server to another FTP server without using the integraiton repositary,and the file name is not changed .Now, we want to also send the file to some with by mail adapter.The scenario  now works by using two business services in receiver determination.But the name of the attachment is "untitled.xml".We know how to set the file name staticly,but how to set the name dynamicly according to the source file name ?
    I have checked miachel's blog "XI: Dynamic name in the mail attachment - pseudo "variable substitution"(/people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution),but how can I get the source file name?
    And another question:Must we restart the adapter or j2ee engine to make the user defined module work?

    Hi,
    >>>but how can I get the source file name?
    form dynamicconfiguration (ASMA)
    >>>And another question:Must we restart the adapter or j2ee engine to make the user defined module work?
    no need for a restart
    Regards,
    Michal Krawczyk

  • Sending mail attachment as XML file

    Hi Experts,
    I have a XML in an ITAB.
    I want to send this data as a mail attachment, any body help, if any one have sample code please send me.
    Thanks,
    Regards
    Venkat

    hi
    chk the sample code
    REPORT ZMAIL_XLS NO STANDARD PAGE HEADING.
    Data for mailing purpose
    DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER
    LINE.
    DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER
    LINE.
    DATA: OBJBIN  LIKE SOLISTI1 OCCURS 10 WITH HEADER
    LINE.
    DATA: OBJTXT  LIKE SOLISTI1 OCCURS 10 WITH HEADER
    LINE.
    DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER
    LINE.
    DATA: DOC_CHNG  LIKE SODOCCHGI1.
    DATA: TAB_LINES LIKE SY-TABIX.
    Data required for preparing XLS type attachment
    DATA: V_TABS     TYPE X VALUE '09',
          V_NEW_LINE TYPE X VALUE '0D'.
    START-OF-SELECTION.
    Prepare data to send
      PERFORM PREPARE_DATA.
    Send mail with XLS attachment
      PERFORM SEND_MAIL.
    *&      Form  send_mail
    form send_mail.
    Creation of the document to be sent
      DOC_CHNG-OBJ_NAME = 'TEST'.
      DOC_CHNG-OBJ_DESCR = 'TEST MAIL WITH XLS
    ATTACHMENT'. "mail subject
      OBJTXT = 'Test mail with XLS attachment'.
      APPEND OBJTXT.
      CLEAR OBJTXT.
      APPEND OBJTXT.
      APPEND OBJTXT.
      OBJTXT = 'Please double click the attachment to
    verify'.
      APPEND OBJTXT.
      DESCRIBE TABLE OBJTXT LINES TAB_LINES.
      READ TABLE OBJTXT INDEX TAB_LINES.
      DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 +
    STRLEN( OBJTXT ).
    Creation of the entry for the compressed document
      CLEAR OBJPACK-TRANSF_BIN.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM   = 0.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM   = TAB_LINES.
      OBJPACK-DOC_TYPE   = 'RAW'.
      APPEND OBJPACK.
      DESCRIBE TABLE OBJBIN LINES TAB_LINES.
      OBJHEAD = 'Sample XLS attachement'. "
      APPEND OBJHEAD.
    Creation of the entry for the compressed attachment
      OBJPACK-TRANSF_BIN = 'X'.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM   = 1.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM   = TAB_LINES.
      OBJPACK-DOC_TYPE   = 'XLS'.
      OBJPACK-OBJ_NAME   = 'TEST'.
      OBJPACK-OBJ_DESCR  = 'Test.XLS'.
      OBJPACK-DOC_SIZE   = TAB_LINES * 255.
      APPEND OBJPACK.
    Completing the recipient list
    For sending mail to Internet Address
    RECLIST-RECEIVER = '[email protected]'.
    RECLIST-REC_TYPE = 'U'.
    For sending mail to SAP user ID
    RECLIST-RECEIVER = 'fing087'.
    RECLIST-REC_TYPE = 'B'.
      APPEND RECLIST.
    Sending the document
           CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
                EXPORTING
                     DOCUMENT_DATA = DOC_CHNG
                     PUT_IN_OUTBOX = 'X'
                TABLES
                     PACKING_LIST  = OBJPACK
                     OBJECT_HEADER = OBJHEAD
                     CONTENTS_BIN  = OBJBIN
                     CONTENTS_TXT  = OBJTXT
                     RECEIVERS     = RECLIST
                EXCEPTIONS
                     TOO_MANY_RECEIVERS         = 1
                     DOCUMENT_NOT_SENT          = 2
                     OPERATION_NO_AUTHORIZATION = 4
                     OTHERS                     = 99.
          CASE SY-SUBRC.
            WHEN 0.
              WRITE  :/ 'MAIL SENT....'.
            WHEN 1.
              WRITE  :/ 'TOO MANY RECEIVERS'.
            WHEN 2.
              WRITE  :/ 'DOCUMENT NOT SENT'.
            WHEN 4.
              WRITE  :/ 'NO SEND AUTHORIZATION'.
            WHEN OTHERS.
              WRITE  :/ 'ERROR OCCURED WHILE SENDING
    MAIL'.
          ENDCASE.
    endform.                    " send_mail
    *&      Form  PREPARE_DATA
    FORM PREPARE_DATA.
      CONCATENATE 'NAME'
                  'ADDRESS'
                  'PHONE'
              INTO OBJBIN-LINE
              SEPARATED BY V_TABS.
      APPEND OBJBIN.
      CLEAR  OBJBIN.
      CONCATENATE  'Hajira'
                   'MIG-2022'
                   '23025487'
                   INTO OBJBIN-LINE SEPARATED BY V_TABS.
      CONCATENATE V_NEW_LINE  OBJBIN-LINE INTO
    OBJBIN-LINE .
      APPEND OBJBIN.
      CLEAR  OBJBIN.
      CONCATENATE  'Faiz'
                   'MIG-2022'
                   '23025487'
                   INTO OBJBIN-LINE SEPARATED BY V_TABS.
      CONCATENATE V_NEW_LINE  OBJBIN-LINE INTO
    OBJBIN-LINE .
      APPEND OBJBIN.
      CLEAR  OBJBIN.
    ENDFORM.                    " PREPARE_DATA
    **reward if helpful
    regards,
    madhumitha

  • How to keep same sender file name for receiver mail attachement

    Hi,
      i am working with File to Mail scanario. There i want to pick a flat file from native file system and then send it as email attachment. Now i am able to send the file but the flat is getting converted as an xml file. is there any method to keep the same sender file name and type for receiver mail attachment. i am not using any mail package. i am using XI payload and keep attachments.
    Thanks in advance.
    -Siva

    Hi,
    Yes,With out using the mail package u can send the Mail Attachments to the receiver side,
    In that case no need of Integration Repository objects.
    Chck this links.
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    /people/community.user/blog/2006/09/07/email-reporting
    /people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    If u dont get ur requirement then let me know ur Mail id i will send u a Doc.
    Regards,
    Phani
    Reward points if Helpful

  • Dynamic file name as mail attachment in receiver Mail Adapter?

    Hi,
    Can any one tell the possibility of attaching file as a mail attachment without using mail Package with dynamic filename.
    Business requirement is to send error response as mail attachment with dynamic name.
    Ex: Error_Response_20110802_13.24 where 20110802 is Date and next part represents time stamp.
    File attachment name should change dynamically in Mail receiver Adapter. Thanks
    Regards,
    Sreeramulu Konjeti.

    there is no standard way.
    you will have to write a module to get this in place.
    other ways are;
    XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping - /people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping
    Dynamic name in the mail attachment - pseudo "variable substitution" :
    /people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution

  • Mail Attachment with attachment name = mail subject name

    Hi,
    I am using the mail adapter and today I am using hard codes attachment names using the MessageTransformBean. I have read the blog /people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution about dynamic filenames but how do I get the eMail subject as a viriable to create the attachment?
    Thanks
    Juergen

    Juergen my weblog was the simplest suggestion to your issue - you can put the mail subject anywhere in
    message get it (and remove) in the adapter module
    you can also try to get the
    Adapter-Specific Message Attributes from the adapter module 
    http://help.sap.com/saphelp_nw04/helpdata/en/43/09b16006526e72e10000000a422035/content.htm
    but I'm not sure it the second solution works with adapter modules - but you can do an easy check
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • Pdf file name in mail attachment

    Hi All,
    For sales order invoice, there is an output type configured which sends the output smartform as pdf attachment in mail.
    The sending medium is 'External send' (Type 5). I want to know how I can give a specific name to this pdf file attachment.
    Since there is no coding involved in generating this pdf attachment, i don't know how to achieve it.
    Can I pass it when i call the function module of the smartform ?
    Please help.
    Regards

    Hi,
    In your driver program, the title for the pdf has to be provided in the import structure for the smartform with name "OUTPUT_OPTIONS" of type SSFCOMPOP.
    In it, use try field TDTITLE or TDCOVTITLE. I don't exactly remember which 1 of these 2, so try both.
    Regards,
    Ashish

  • XI mail adapter - File name should be same in attachment

    Hi all,
    Here is our scenario:
    First part of our scenario involves picking *.pgp (e.g. addressB.pgp) file from partner FTP server and after decrypting put it on local Unix path - This part works ok
    In second part, we send this file by mail to static mail receivers as attachment
    (Message Protocol - XIPAYLOAD, Use Mail Package and Keep Attachments unchecked)
    When we receive this file as attachment, the attachment name is some random value, we need to keep the attachment name same.
    i.e. If we are picking and sending file "addressB.txt" then in mail attachment name should be "addressB.txt"
    Please suggest how this can be done
    Thanks
    Girish

    Hi Girish,
    We have a same scenario where XI is picking file from R/3 directory and sending it as a mail attachment without any mapping,the attachment name was supposed to be same,ex: abc.csv.
    I had the same problem,that every time I used to receive a randon attachment name like att34.txt,etc (recipient might be afraid that this is a virus )
    To resolve this,please add these modules in your mail receiver:
    1     localejbs/AF_Modules/MessageTransformBean     Local Enterprise Bean     Transform
    Transform     Transform.ContentDisposition     attachment;filename="abc.csv"
    Transform     Transform.ContentType                          text/plain;charset="UTF-8"
    If you use this,your attachment name will always be abc.csv.
    Kindly let us know if this works for you.
    Thanks.
    Regards,
    Shweta

  • Sending XML file as attachment in E-mail

    Hi,
    I'm facing a problem with sending e-mails with an XML-file as attachment. Scenario is as follows:
    - I collect the payload from XI with FM 'SXMB_READ_MESSAGE_VERSION_RAW'.
    - This payload is in the form of an xstring.
    - I convert this xstring to binary content by using FM 'SCMS_XSTRING_TO_BINARY'.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        buffer                = lv_buffer
      * APPEND_TO_TABLE       = ' '
      IMPORTING
        output_length         = lv_i
      TABLES
        binary_tab            = lt_conhex.
    The itab lt_conhex is of type solix_tab.This is used finally to send the mail via class CL_BCS following normal procedures. Now when I open the e-mail with attachments I get the error that in the last line of my xml-file some squares are placed, which causes the document to open incorrectly.  When I delete the squares via e.g. notepad and open my xml-file again in my internet browser, it opens correctly.
    If I look at the contents of the solix_tab I see that the last line of the hexadecimal values are zero's, probably causing the XML file to be attached/oopened incorrectly. Is there any way to replace these zero's with some hexadecimal value in order to display my XML-file correctly?
    Kind regards!

    Thanks Sandra,
    Overlooked that parameter. Indeed if you take the XSTRLEN of the document and place this in the method for creating the attachment it works fine.
    CALL METHOD lo_email->add_attachment
      EXPORTING
        i_attachment_type      = ls_email-type
        i_attachment_subject   = ls_email-subject
        i_att_content_hex      = ls_email-content_hex
        i_attachment_size      = ls_email-content_length.
    By the way...if you're dealing with PDF documents this documentlength doesn't matter.

  • When I open up an e-mail attachment a box pops up PRINT TO FILE below that line OUTPUT FILE NAME with an empty line for the file name vs. simply going to my default printer?

    when I open up an e-mail attachment a box pops up PRINT TO FILE below that line OUTPUT FILE NAME with an empty line for the file name vs. simply going to my default printer?

    Make sure that '''''Print to File''''' isn't selected in the native print dialog box ''(see screenshot below)'' middle-right, and make sure your Printer is selected at the top of that dialog box.
    ''I'm a little confused why an email attachment would need to go directly to the printer, but that's what you asked about.''

  • Change e-mail attachment name dynamic in Broadcaster

    Hi,
    I want to send an e-mail to multiple recipient by the setting "e-mail bursting" in broadcaster. Each e-mail has an attachment (pdf-document).
    Is it possible, to change the name of the attachment dynamic, when sending the mail to the different recipients (example:
    recipient 1: recipient1.pdf,
    recipient 2: recipient2.pdf,
    and so on)
    I tried a solution with text variables, but it didn't work.
    Regards,
    Tim Jaschik

    Hi,
    thanks for your fast answer. But my problem is to change the attachment name of the e-mail, not to schedule the e-mail.
    So, is there no possibility to control the process which creates the attachment name?
    Regards,
    Tim

Maybe you are looking for

  • How to Compile Servlet Java Files

    hello ... i am a beginner at JSPs and java servlets ... i have been searchin' hopelessly for the past couple of days. Could someone please guide me on how to compile source files for servlets ... namely how can i include the packages javax.servlet.*

  • Pdf slideshow in LR1.3.1 appalling resolution

    There is something seriously wrong with the downsizing of images for a slideshow exported to pdf. I exported using 1024x768 as the chosen resolution. On viewing the pictures looked horrid, so I repeated the export but with jpg quality set to 100%. Sa

  • Send a XML file using the mail adapter

    HI , I have to send an incoming xml message as a attachment in the mail using mail adapter . how can I achieve this . Thanks Nikhil

  • XML Web Service application

    Hi all I have to design and develop a web service. Where the client sends automaticaly XML files to b analized. (They get sent whenever a special event happens) the server recibes it, verify it agaist a DB and the return XML files with an extra STATU

  • SetBounds & setSize bug?

    Hi All, I have a strange problem with my applet, it sometimes does not fully display (Only display half or 1/3 of its height). I tried to add setBounds and setSize calls, I even called to resize using Javascript but the applet still does not display