Mail Adapter ZIP File Attachment
Hello,
I have created an interface using the mail receiver to mail a file as an attachment to an email address. I have used an ABAP mapping to create the Mail message associating the required content of Mail message. This all works fine and the emails with the required attachments are delivered successfully.
I now need the ability to ZIP the file attachments. I have had a look through some of the forum messages and it looks like I am going to have to create a java module for the receiver mail adapter to ZIP the file.
Has anyone done this before? If so can you give me some pointers. I have developed modules for the file adapter but am not sure how to ZIP.
Alternatively can this be done as part of the ABAP mapping. I have started looking at class CL_ABAP_ZIP. I am now able to compress the content but this does not create a valid archive as the attachment.
Any help would be much appreciated.
Thanks
Gary
Dear Sameer ,
Can you send me the Java Code which zips the folder or files .
My email id is [email protected]
Regards
Prabhat
Similar Messages
-
Sender "Mail" adapter - CSV file attachment
Hi there
I'm looking for some help in configuring a sender mail adapter that receives ".csv" files. I did read some blogs that mention using the "PayloadSwapBean" module to read the mail attachment instead of the mail content. My problem is to now convert the ".csv" file into a message. Is there a module that I can use ( is it the "MessageTransfomBean" ) and how. Any help would be appreciated.
Thanks
SalilHi Salil,
If you want to send a mail with a body and attachments, the message sender HAS to provide an XI message with attachments. I doubt a CSV file does justice.
As Renjith said you need to convert CSV to XmL.
A short description about the Standard Modules:
MessageTransformationBean is a standard module used to apply the XSLT mapping to the adapter module by using <i>Transform.class</i> ( This xslt mapping is done to create a mail package, Dont confuse with the actual mapping in your case this is NOT for converting csv to xml).
Also this module can be used to change the name and type of payloads by using <i>Transform.contentType</i>, <i>Transform.contentDisposition</i>, <i>Transform.contentDescription</i>.
PayloadSwapbean is a standard module for replacing payloads with other payloads (SWAP)
If you want to give each attachment a certain name use Parameters, <i>swap.keyname</i> for name of the payload and <i>swap.keyvalue</i>.
I Hope the use of standard modules is understood. -
Mail adapter flat file attachment
Hi,
From my limited knowledge of XI, I know that we can send an email attachment as an .xml file or a binary file. My question is how can I send a flat file as an attachment using XI's mail adapter? If this is possible, please suggest steps how to do this as I am clueless!!
Thanks for your help...
ChanduHi,
check out this Blog you will be able to do it.
You can do either using Mail package or just using Mail adapter.
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816
http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/content.htm
Thanks,
Prakash -
Zip file attachment in Apple Mail
I am new to Mac and Apple Mail. I received a mail with a zip file attached. But Apple Mail shows the attachment as some html text. How do I retrieve and save the zip file?
some one sent you a zip file and you are having trouble opening it... it shouldn't... but if you do you can down load: http://www.stuffit.com/mac-expander.html
or http://itunes.apple.com/us/app/stuffit-expander/id405580712?mt=12 -
How to email a .zip file attachment from PC
Hi,
Please, let me know how to email a .zip file attachment from Presentation Server.
Thanks,
Madhuri.Hi,
try fm SO_DOCUMENT_SEND_API1
it's well documented (look with SE37)
and look here:
/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
regards Andreas -
Hi,
I have written a simple email client that sends a multipart message with a zip file attachment. I have written another email client that receives that email. I built it from looking at the javamail samples and the JGuru tutorial. Everything works fine on one mail host I am using, but I get errors on another email host. The two errors I see are....
javax.mail.internet.ParseException
at javax.mail.internet.ParameterList.<init>(ParameterList.java:61)
at javax.mail.internet.ContentType.<init>(ContentType.java:83)
at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:269)
at javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:159)
and...
javax.mail.MessagingException: Missing start boundary
at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:297)
at javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:159)
both of these errors occur when I call the MultiPart.getCount() method. I have seen a lot of similar posts here, but no solution. One hint at what my problem might be is that the host that I get the error on is in Europe. The most confusing thing is that other than having a different boundary, the received message that works correctly looks identical to the one that doesn't work.
Any ideas on what the problem is?
Thanks.Yes, I am having the same issue. But I am seeing these issue after the exchange server is upgraded to 2003. It seems like there is an issue with Message format in Exchange 2003. Any idea what we need to do fix this issue?
-
I receive many e-mails with zipped files. I can no longer open or unzip my files. A window welcoming me to Application Loader drops down. It prompts for an iTunes Connect login, but will no accept my iTunes login. I have no way to open or unzip my files. Help!!!!
Application Loader, unless there's another one I'm not familiar with, is part of the iOS SDK. That have usurped the .zip, or you may have removed that application but your Mac is still holding onto the mapping of Zip files to that application. Select a .zip file in Finder, Get Info, and go to the Open with section. Select Archive Utility and click Change All. That should fix the problem.
Regards. -
Hello All
How to attach a ZIP file in DMS while creating document from CV01N transaction.
I have tried this in CV01n & ZIP file is attached but after creating Document when I am go in CV02N transaction & tries to open the ZIP file attachement system is giving the error "File can not be opened...File format is not correct"
Is there any seeting I need to do for data carrier type & Application type.
Your reply is appreciated.
Thanks
Pravink.Hi Pravin,
Have you maintained in DC30 "work station application" following entries
for eg:
TZP *.zip
For the required DMS document type.
If yes, let us know the error message you get.
Regards,
Deepak Kori -
Retreiving zip file attachement
Hi,
How can I read a zip file attachment that is sent
inline in the message?
thanks,
dannyyI dont think
u can do much with the zipped attachments only solution would be to give the download option for this zipped attachment and i think u know how to do it
[email protected]
regards
hari -
Unzip attachment in Mail adapter or/ File Adapter
Hi everyone,
I need to get flat file from .zip attachment that comes with mail? Is it possible to get it with Mail adapter, unzip it and then make conversion? All steps in the Integration engine?
Another option can be get .zip with File adapter, but again how to unzip it?
Thanks,any help appriciated as I am doing my first XI project.
Nataliya>
Buffy76 wrote:
> Thanks a lot, guys. Unzipping is clear now.
>
> Prateek, it would be great if you can you point to "how-to" file or example for MessageTransformBean.
>
> Regards,
>
> Nataliya
ref this https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05 -
XI Mail Adapter TXT file as attachment
Hi, I am using Mail Receiver adapter to receive data from Sender ABAP Proxy.The attachment file contains data with all Labels, i used in the Target Message Type.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:XogisticsOB_MT1 xmlns:ns0="http://selectcomfort.com/sapcrm/xogistics/outbound"><HEADER1000><EDI_HEADER_STR></EDI_HEADER_STR><TASK_ID>8000001959</TASK_ID><TOT_BOXES> 1</TOT_BOXES><NAME_LAST>Di Capri</NAME_LAST><NAME_FIRST>Sheela</NAME_FIRST>
Please let me know how can i exclude these labels such as
<HEADER1000> </HEADER1000> , <TASK_ID></TASK_ID>,
<NAME_LAST></NAME_LAST> etc...
from appearing in the File Content.
The ModuleKey contains
Transform.ContentDisposition attachment;filename="Outbound1.txt"
Transform.ContentDescription Outbound1
Transform.ContentType text/txt;name="Outbdound1.txt"
Thanks.
RushikeshHi,
If ur using the mail adapter as receiver then if u dont use mail package then the attachment will come as it is file.
If u use mail package then it will come in XML format
for reference please check some links.
Receiver Mail Adapter.
/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
eMail Reporting
eMail Report as Attachment (Excel/Word)
The specified item was not found.
The specified item was not found.
The specified item was not found.
Regards,
Phani -
Hello,
we are searching for an answer to the following problem...
We are trying to send an email with an attached file via the email adapter. We are using the mail package format for sending the email. The content of the mail package is converted into an file attachment in the mail adapter. Because we have to define the attachment name we use the MessageTransformationBean to change it.
Now we want to zip the attached file... Can anyone give me a hint, how to realize it? Have we write a module, which we have to call inside the mail adapter? If so, where must we place this module in the EJB sequence?
Thank you for your replies...
Best regards,
LarsHi Palaniraja,
thank you for your answer...
My question to your suggestion is, can we use it in our case? Because we generate the attached file with the email adapter. I don't know exactly if the file is already send, if we place the module behind the mail adapter EJB. Or must we place it before this EJB. Which step will be the best time to place the new module? Before or after the mail adapter EJB?
It would be great to get the code from your site... Could you please send the code to my EMail address from my Business Card?
Thanks a lot...
Regards,
Lars -
Sender Mail adapter configuration with attachment
Hi,
I read the below blog regarding the mail adapter
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
I have the same requirement but the attachment file is not an XML, it is CSV file so in the module tab if I change like below is it enough?
TRANSFORM swap.keyValue attachment; filename=u201DMailAttachment-1.csvu201D (I think MailAttachment-1 is the file name, am I correct?)
If I change like above is it ok? or any other thing is required, Could you please give me the inputs
Thanks
RameshI have the same requirement but the attachment file is not an XML, it is CSV file so in the module tab if I change like below is
it enough?
PayloadSwapBean will ensure that the input to the mapping is from the attachment.....in the blog the attachment is in XML format and hence there was no need for any conversion.....yours is however a CSV file so you need to convert it to XML first and then do the further processing.....you can either use the MessageTransformationBean as shown in this blog:
/people/gabrielsagayaselvam.panneerselvam/blog/2009/08/31/solve-key-field-problem-using-structplain2xml-in-messagetransformationbean
Or write your own module code for the conversion.
Regards,
Abhishek. -
Mail Adapter Change File Extension
We have the receiver mail adapter setup to send the contents of a message to an internal email account. The adapter works and the message arrives as a soap.xml and payload.xml. The problem is that our mail system blocks the xml extension. Is there an easy way to switch the extensions from say xml to txt on the messages.
It looks like the PayloadSwapBean module can change the content type, but I just want to alter the extensions. I know I could use an XSLT to convert the contents to html and then just send the message as an html email but I was hoping to avoid design changes.
RegardsJ,
Check note : 856599
<i>Q: Can I choose the name of an attachment in the mail?
A: Yes. Most mail clients use some heuristics based on some MIME headers to derive the name of an attachment. The MIME headers involved in most heuristics are Content-Type, Content-Description, and Content-Disposition. When you create an XI message, the XI payload name is automatically set in the Content-Description. If you want to change or set all of these headers, you can use the MessageTransformBean module (Note 793922) in the adapter framework.
Related questions: How can I set the file name of a mail attachment?
Q: How can I set the file name of a mail attachment?
There are several MIME headers that play a role in how the client retrieves the file name of an attachment. Unfortunately, this behavior differs among various mail clients. The reason for this inconsistent behavior comes from the fact that this mechanism has been extended incrementally. The old way is to use the name parameter in the Content-Type header as specified in RFC1341. For example, you can set the content type of an XML attachment as:
Content-Type: application/xml; name="abc.xml"
RFC1521 discourages the use of this name parameter in anticipation of the new header Content-Disposition, which is defined in RFC1806.
With this Content-Disposition header, you can set the file name as:
Content-Disposition: attachment; filename="abc.xml"
Some clients may show the Content-Description value as the file name. The Content-Description header is typically used to associate some descriptive information to an attachment (RFC1341) as in
Content-Description: my xml file
To avoid potential interpretation problems, it is recommended to combine the use of these headers.
How to use MailPackage in Receiver?
A: When a mail message is sent out by the receiver adapter, normally the mail header information such as "From", "To", "Subject" are taken from the channel configuration. In order to dynamically set these headers, you can use the MailPackage mode. In this case, the XI payload must be formated in the Mail Package XML format. The format of this mail package XML document is defined in note 748024.</i>
Use the mail Package and the set the <b>Content-Disposition </b> with the file name and extension.
For info on how to use this mail package, take a look at this blog too,
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
Regards,
Bhavesh -
Rx Mail Adapter configuration for Attachment sending and dynamic From/ To
Hi
I have a senario in which i have to send a file content as an attachment and then take the values of the from / to /CC from the xml dynamically and post.
I am able to do it without dynamic
Do we need to add some modules to do the same.
RGds
AdityaHi,
Check this Weblogs
Dynamic Mail Address
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
Triggering Email from folder
/people/sravya.talanki2/blog/2005/08/18/triggering-e-mails-to-shared-folders-of-sap-is-u
Mail Adapter options
/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
<b>Cheers,
*RAJ*
*Reward points if found usefull*</b>
Maybe you are looking for
-
Item text not populating in sales order
Hi All, I have a scenario where in we get the sales order created through a inbound 850 idoc . The trading partner sends the sales order information which gets through GENTRAN and gets posted as inbound idoc in SAP . The problem here is
-
I had the hard drive replaced on my mac. I did a restore from back up drive to my new hard drive. First LR4 couldn't find the catalog so I pointed to it. Then I opened lightroom 4 and it cannot see ANY of my photos. I don't want to link each folder
-
Why can't apple put a simple audible low battery indicator on the iphone?
I get so tired of having my iphone shut down on me mid-conversation. My screen is black and up to my ear; my phone is in my purse while I'm talking on my blue tooth and also has a black screen; or my phone is on my hip with a black screen while I tal
-
Hi Expert, Good day! I would like to ask regarding MB51 and MB5B standard reports, I generate all material documents in MB51 and MB5B to compare both transaction for only 1 material with the same in parameters especially material no, plant storage lo
-
I have a PDF that we wanted to use on mobile devices. I edited the PDF using livecycle, added in all the functions I needed to get the totals to add up at the end. All functions work on the computer. I have tested both Mac & PC. When I try to open it