Getting name of file in an email attachment

I have a sender mail adapter that has been configured to pick up emails with file attachments from a mail box.
The mail adapter passes processing onto the PayloadSwapBean and then onto a customised module that processes the file attachment (a CSV file).
When I use the messaging system i.e. http://xiserver:port/MessagingSystem/monitor/monitor.jsp
I see the following output, which includes the attachment's file name in the Content-Type i.e. INV_5016888091848_20060912_00001.csv
Content-Type: application/octet-stream;name="INV_5016888091848_20060912_00001.csv"
Content-Disposition: attachment;filename="MailMessage.bin"
Content-Description: MailMessage
In my customised module I have attempted to pick up this file name from the payload using the "getContentType" method of the "XMLPayload" class but this only returns "application/octet-stream" and does not include the file name.
Does anyone know how I can get hold of the above file name using the Adapter Framework API?

Hi,
Have you tried the following...
In the adapter module that you wrote, did you try calling the method 'getSupplementalDataNames() ' of the 'ModuleData' class ??
I am assuming all the attachment details should be available in the enumeration this method returns...please let me know...
My reasoning that it might work is that the 'PAYLOADswapbean' is somehow reading all the attachments details..which technically we should be able to do if we wrote an adapter module on our own....
I did not get time to try this out..please check if this helps....
Thanks.

Similar Messages

  • Cant open a pdf file as an email attachment

    I need help. I can't open a pdf file as an email attachment. It's like my computer doesn't think reader is installed. I can open an existing file through reader. I have deinstalled and reinstalled reader and am getting the same results.

    You can save the attachment and then open it.
    We can try to help but you haven't mentioned what you are using for your email...

  • Pdf file sent via email attachment gets a webloc extension

    Someone sent an email with a pdf attachment to our entire school via our google mail account. People with PCs were able to open the pdf files. Mac users received the pdf files with a webloc extension (i.e. - filename.pdf.webloc) and were unable to open it. How did this happen and how can we prevent it from happening again? I had 2 of the pdf files on my mac (one of which I created) and they did not have a webloc extension. Any help would be great. Thank you!!

    Hi Kappy.
    I tried that and received a message from Adobe Acrobat that read "Adobe Reader could not open 'Absentee Ballot.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).
    Since we have 300+ families who receive these emails and I don't know who has a mac and who doesn't I would rather be able to send the pdf attachments and prevent the webloc from being applied at all versus letting everyone know how to remove it once they receive it.
    Thanks for replying.
    Christina

  • Converting html file into zip file and send email attaching zip file

    Hi Experts,
    I am trying to send email with attachment(html). Which contains more than 7MB. So, It is throwing an error like Size exceeded.
    So, Now i need to compress the data for less than 7MB.
    I decided to convert HTML File into ZIP File.
    Kindly suggest me to convert the HTML file into ZIP file and sending email with attached ZIP file.
    Correct answer rewarded,
    Thanks & Regards,
    N. HARISH KUMAR

    Hi Experts,
    *// HTML_TAB converting into ZIP File
       DATA  : zip_tool TYPE REF TO cl_abap_zip,
               filename TYPE string ,
               filename_zip TYPE string .
       DATA  : t_data_tab TYPE TABLE OF x255,
               bin_size TYPE i,
               buffer_x TYPE xstring,
               buffer_zip TYPE xstring.
    filename = text-007.                                                                          "'HTML_TAB
    *describe the attachment
       DESCRIBE TABLE html_tab LINES tab_lines.
       bin_size = tab_lines * 255.
       CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
         EXPORTING
           input_length = bin_size
         IMPORTING
           buffer       = buffer_x
         TABLES
           binary_tab   = html_tab.
       IF sy-subrc <> 0.
    *     message id sy-msgid type sy-msgty number sy-msgno
    *     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    *create zip tool
       CREATE OBJECT zip_tool.
    *add binary file
       CALL METHOD zip_tool->add
         EXPORTING
           name    = 'FSSAI_MAIL.HTML'
           content = buffer_x.
    *get binary ZIP file
       CALL METHOD zip_tool->save
         RECEIVING
           zip = buffer_zip.
       CLEAR: t_data_tab[],bin_size.
       CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
         EXPORTING
           buffer        = buffer_zip
         IMPORTING
           output_length = bin_size
         TABLES
           binary_tab    = html_tab.
    Thanks & Regards,
    N. HARISH KUMAR

  • Create end of file character in email attachment

    Hi all,
    Currently I am attaching a text file to the email send using FM 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
    But here the issue is, in attachment file there are extra 3 blank lines are getting filled which client does't want.
    Is there any way to generate end of file character, to add after all rows got filled in internal table?
    Or is there any way to not to filled blank lines at the end of the file?
    Please advise a solution.
    Thanks and Regards
    Nishad

    Hi,
    gs_packinglist-doc_size =  gf_count * 255 .
    This is how I am passing the doc_size. In the above, gf_count is the number rows in attachment file that I am multiplying with 255 characters as I am passing attachment in contents_bin parameter.
    Thanks and regards
    Nishad

  • How do I get a video to load in email attachment of an interactive pdf?

    Hello,
    I'm trying to create an interactive newsletter to be sent to clients by email,
    and I was wondering how to get a video file to load upon opening.
    Currently you have to download the pdf to view the video.
    I'm working on OSX 10.9.5 in InDesign CS5.
    And I have the video as an integrated file, would my results change if I linked the file from a web link?
    Thanks!

    If the video is only linked it would reduce the file size of the pdf and it would make it accessible for people opening on a device (like iPad) which does not allow flash which must be installed with Acrobat to view embedded media.
    But I would recommend to send the people only a link to the PDF. I hate it, when my iPhone filled with useless stuff, if I would like to see it I could donwload, but as attachment make my space overfilled.

  • How do I download a song file from an email attachment to my iPad?

    I have a song file in my email. I can hear it when I touch on it, but I want a way save it to my iPad music. I want to put it into my music so it's there on my iPad.

    Okay. This iPad is synced with my husband's iTunes. He's in California with his Mac, I'm here in New York. How do I save music from an email attachment onto the iPad.

  • How to send text file as an email attachment havin more than 255 characters

    My requirement is to generate a text file and to send this text file as E-mail attachment. I am using FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send the E-mail. but here the limitation is the number of characters per line must not be more than 255 characters whereas in my case it is exceeding 1000 characters per line. could anyone please suggest me what should i do now ? Each field in the text file has to be tab delimited.

    Simplest might well be to use javamail API instead of the two tags that Sites provides, e.g. see email - Sending mail attachment using Java - Stack Overflow for a full example.
    Phil

  • Sending DBF file as an email attachment

    Hi,
    I have a requirement to extract data from database table then send it as a DBF file in an external e-mail. By browsing the threads, i was able to create a DBF file using FM DOWNLOAD, I know this is obsolete but GUI_DOWNLOAD does not support DBF file type. This is currently stored in my local drive. This is working fine. I can view the file using FoxPro. My problem here is how to automatically send that DBF file in an email as an attachment.
    I learned that FM SO_DOCUMENT_SEND_API1 can be used but I think it doesn’t support a DBF filetype. I am receiving a message something like it is not a table when I open the file in FoxPro.
    Any help will be greatly appreciated. Thanks!

    Change in requirement. Only store DBF in the shared folder.
    Closing this thread.

  • How to get name of file

    In a folder I have a file called "file1.grf"
    There may also be a file called "file1_zx.grf"
    I dont know the exact name - only that it will be like "file1_*.grf"
    I have the path of the folder, and I know the name "file1.frg".
    How do I get the name of the file "file1_zx.grf" if it exists?
    I would like to have a function like
    Public Function fileName(name as string, path As string) As string
    that returns the proper name or blank if it does not exist.
    I have rutines like - and I hope to make something similar:
    Public Function file_exists(path As Variant) As Boolean
        Dim FS As Object
        file_exists = False
        Set FS = CreateObject("scripting.filesystemobject")
        If Not IsNull(path) Then
            If FS.FileExists(path) Then
                file_exists = True
            End If
        End If
    End Function
    Public Function folder_exists(path As Variant) As Boolean
        Dim FS As Object
        folder_exists = False
        Set FS = CreateObject("scripting.filesystemobject")
        If Not IsNull(path) Then
            If FS.folderexists(path) Then
                folder_exists = True
            End If
        End If
    End Function

    Hi,
    << How do I get the name of the file "file1_zx.grf" if it exists?
    Before you get the name the file, first you need to be sure the file existed, then get the file name from the path. Here are ways you can refer to
    ' judge the file exists or not
    Function IsFileExists(ByVal strFileName As String) As Boolean
    If Dir(strFileName, 16) <> Empty Then
        IsFileExists = True
    Else
        IsFileExists = False
    End If
    End Function
    ' judge the file exists or not
    Function IsFileExists(ByVal strFileName As String) As Boolean 
    Dim objFileSystem As Object 
    Set objFileSystem = CreateObject("Scripting.FileSystemObject") 
    If objFileSystem.fileExists(strFileName) = True Then 
    IsFileExists = True 
    Else 
    IsFileExists = False 
    End If 
    End Function
    ' Get the file name
    Function GetFilenameFromPath(ByVal strPath As String) As String
    ' Returns the rightmost characters of a string upto but not including the rightmost '\'
        If Right$(strPath, 1) <> "\" And Len(strPath) > 0 Then
            GetFilenameFromPath = GetFilenameFromPath(Left$(strPath, Len(strPath) - 1)) + Right$(strPath, 1)
        End If
    End Function
    Sub Run()
       If IsFileExists("D:\vba\abc.txt") = True Then
       FileName = GetFilenameFromPath("D:\vba\abc.txt")
        MsgBox (FileName)
    Else
           MsgBox "No releevant file"
        End If
    End Sub
    Hope this could help you.
    Best Regards
    Lan
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problem in opening of word and excell files downloaded from email attachment in MS office professional 2013 paper licence

    Hi,
    I am facing the problem in opening the word and excel files received through email in my MS office professional 2013 paper licence, Microsoft Windows 8.1 enviornment. please help in this matter
    regards
    Rajeev Bhagwat
    Administrative Officer-I
    Purchase and Store Section
    UGC-DAE Consortium for Scientific Research,
    University Campus, Khandwa Road, Indore (M.P.), India.
    Telefax-+917312361546

    I should further say the files I sent are .xlsx and .docx files.  They look fine my end and I send such files all the time without problems.
    However, I did try to cheat by going in via the Safari onto my 'live' online email account and the Safari automatically transfers them to winmail.dat files with the same result.
    Ahh - have just been on using my PC this time and you are right, it seems that the service provider does the transfer and then when my outlook opens the file (on the PC), it must reconvert to .xlsx etc again.
    Very strange.
    Ergo, I guess the question should be how I open wimail.dat files ??

  • Mail:send mail:attachment. Is there a simplest way to send a file as an email attachment ? or more correct ?

    <satellite:form  method="post" id="contact-form" enctype="multipart/form-data">
         <input type="file" name="adjunto" />
    </satellite:form>
    FTValList ftListaFichero = new FTValList(1);
    ftListaFichero.setValBLOB(ics.GetVar("adjunto_file"), ics.GetBin("adjunto"));
      <mail:send
           to="<%=to_emailaddress %>"
           from="<%=from_emailaddress%>"
           subject="Subject"
           body="<%=body %>" >
        <mail:attachment value='<%=ftListaFichero.getVal(ics.GetVar("adjunto_file"))%>'/>
      </mail:send>
    http://docs.oracle.com/cd/E29542_01/apirefs.1111/e39371/JSP/mail-attachment.html
    http://docs.oracle.com/cd/E29542_01/apirefs.1111/e39371/JSP/mail-send.html
    Regards,

    Simplest might well be to use javamail API instead of the two tags that Sites provides, e.g. see email - Sending mail attachment using Java - Stack Overflow for a full example.
    Phil

  • I cannot ope PDF files that are within a web link.  Neither Safari nor Firefox will work.  If I receive a PDF file as an email attachment, I can open it with either Adobe or Preview.  I'm running 10.6.8 on an iMac.

    I'm going to re-state this.  Several weeks ago, I had installed Security Update 2012-004 on my iMac.  I'm running Snow Leopard 10.6.8.  Immediately afterwards, my Mail 4.6 was GONE.  Mail 4.2 was there, but the system would not open it.  The Apple Support Communites quickly solved my problem.  The problem lay within the Update.  Now, I cannot open PDF files that are contained within a website, i.e. a lunch menu that is on a restaurant website.  This happens on both Safari and Firefox.  If someone sends me an email with an attached PDF file, I can open the file with either Adobe or Preview.  This is happening only on my iMac.  My MacBook Pro, also running Snow Leopard 10.6.8 has not experienced either the first or second problem.  Thanks for any help you can offer.

    fomamac2guy wrote:
    Now, I cannot open PDF files that are contained within a website, i.e. a lunch menu that is on a restaurant website.
    Does this help with Firefox?

  • Sending Flat file as an Email Attachment

    Hi,
    I have configured Mail Adapter to send XML Payload as an attachment .
    But now i need to send Flat file as an attachment using Mail Adpater . Can any body help me out in this regard

    Hi Vinay,
    Yes , steps will same as earlier, use the blog i provided you.
    *Configuring the Receiver Mail Adapter*
    For outgoing mails, you need SMTP or IMAP4 access to your mail server. To access the mail server, enter the following URL:
    smtp://YourServer or imap://YourServer/YourInbox
    By selecting the Use Mail Package checkbox, you can include additional information to the XI message payload, that is, the mail sender.
    If the mail has a plain-text format, you can select the Use Mail Package checkbox to convert the mail message to XML.
    Working with Mail Packages
    You can dynamically set the sender, receiver, and mail title by using the mail package format. When the mail package format is used, your structure of the payload must adhere to the structure of the mail package.
    You can create the mail package structure using the graphical mapping tool. The XSD of the mail package is provided as an attachment in SAP Note 748024.
    Creating a Mail Package with XSLT Mapping
    If you want to determine the mail receiver dynamically from a payload field, but want the
    payload to be sent unchanged, sometimes it is too complicated to use the graphical
    mapping tool to create the mapping. The following figure provides an XSLT example that you can use, if your original payload provides the tags sender, receiver, and subject. The XSLT will set these values and copy the whole payload to the Content tag. The original payload will be the mail body.
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:output method="xml" indent="yes" />
    <xsl:template match="*">
    <ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
    <Subject><xsl:value-of select="//subject"/></Subject>
    <From><xsl:value-of select="//sender"/></From>
    <To><xsl:value-of select="//receiver"/></To>
    <Content><xsl:copy-of select="/"/></Content>
    </ns:Mail>
    </xsl:template>
    </xsl:stylesheet>
    When you use the MessageTransformBean module in the module processor
    configuration of the communication channel, you can directly apply the XSLT mapping to the adapter module.
    Enter localejbs/AF_Modules/MessageTransformBean as the first module. Select
    the Type Local Enterprise Bean and select a value for Module Key.
    You can also use the XSLT file for an interface mapping in the Integration Repository.
    Changing the Name and Type of the Payload
    By default, the payload of the XI message is sent as an attachment. If you use mail
    package, the mail text in the Content tag is sent as a mail body (inline). If you want to change this or influence the name of the attachment, you can do this using the
    MessageTransformBean module.
    Enter localejbs/AF_Modules/MessageTransformBean as the first module.
    Select the Type Local Enterprise Bean and select a value for Module Key.
    If you use the Mail Package, then you have to apply the Mime type in the tag
    Content_Type:
    <ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
    <Subject>Hello</Subject>
    <From>[email protected]</From>
    <To>[email protected]</To>
    <Content>This is a mail</Content>
    <Content_Type>text/plain; charset="ISO-8859-1";
    name="MyFile.xml"</Content_Type>
    </ns:Mail>
    Exactly how the mail content is displayed at the receiver end depends on the mail client. If the customer has a different mailing system, the mail look may look different at the customer side.
    *_Sending a Mail with Attachment  (That is what you need)_*
    If you want to send a mail with a body and attachment, or with several attachments, the message sender has to provide an XI message with additional attachments. For each additional payload of the XI message, the mail adapter creates an attachment for the mail. To enable this feature, you select the Keep Attachments checkbox when configuring the mail adapter. By default, the payload of the message is also sent as an attachment. If you do not want the payload to be sent as an attachment, set ContentDisposition to inline. If you want to give each attachment a certain name, you can use the swap module. The swap module changes the main payload.
    Enter the localejbs/AF_Modules/PayloadSwapBean module as Local
    Enterprise Bean between the two modules that change the attachment names.
    Select a value for Module Key.
    You can find the name of the payload that you want to set as the main payload in the XI message monitor (SXMB_MONI).
    Useful SAP Notes
    SAP Note 748024: Here you can download the XSD structure of the Mail Package.
    SAP Note 794943: Description of the module “PayloadSwapBean”
    SAP Note 793922: Description of the module
    Hope this will help you.
    Regards
    Aashish Sinha
    PS : reward points if helpful

  • Php - get name from 'file field' and pass to database?

    Is it possible to extract the 'image' name from the 'file' field and insert it into a database using php?
    <input type="file" name="ImageName" id="ImageName">
    I can't have:
    $ImageName = trim($_FILE['ImageName']);
    So hows this handled?
    Cheers
    Os

    Murray *ACP* wrote:
    Should be pretty strightforward, Os.  You know where to ask the questions!
    Yeah.. but I keep coming up against brick walls
    I'm trying to manipulate David Powers PHP Solutions chapter 6 - Uploading Files.
    He's got some sort of complicated function going on which makes sure no two images which are uploaded to a folder have the same name. i.e., london.jpg becomes london_1.jpg. (the php even inserts underscores if there are gaps in the image name)
    If I just use $ImageName = $_FILES["ImageName"]["name"]; potentially I could end up with dozens of images with the same name in the database, which is NOT desirable.
    Of course I could simplyfy everything and use two forms - 1 for uploading the images to the upload folder and then one for inserting the images details into the database BUT that has the drawback of the client needing to type in the name of the image identically to match the name which has been generated in the upload folder and that aint gonna happen in a million years

Maybe you are looking for

  • My ipod safari can't open links or press buttons.

    Like for instance,I tried to press one of the episodes from http://www.justanimedubbed.tv/watch/adventure-time/ and it won't let me.When I press it,it doesn't do anything...And even if I type the specific URL for the episode,it won't let me watch the

  • Need to Upgrade IGS,JAVA Engine

    Hi folks, how to check out IGS kernel level? I need to do Kernel upgrade  for  IGS and Java Engine, can u guys please send me the steps how to do it. And what files i need to download from market place? right know i have sp-09 Thanks in Advance regar

  • Multi tasking with Front Row

    Is there any way to use the Mac for other tasks while Front Row is running? Ideally I'd run Spaces on the Mac and limit Front Row to a single Space and then be able to switch to another Space to use the mac for something else. This is not a CPU speed

  • Opca could not connect to the specified database

    I have both Oracle 9.2 database and Oracle 9iAS R2 Standard Edition installed in my same home pc. The origin database name is FIRST and the listener port is 1526. My pc's host name is mypc.chen.com and the IP address in my local LAN is 192.168.0.1. I

  • EPCM.getSAPTop().LSAPI.AFPPlugin is null or not an object

    Hello Guys, I am doing customization of AJAX Framework Page in Portal 7.3. I have created a copy of default ajax framework modify it and and my custom page and desktop, and add a new entry in the master rule to use the custom ajax framework page but