Rename the attachment of the Sender mail adapter
Hello Everyone,
i have Mail to file scenario. There is an attachment in mail and this file needs to be renamed and dropped in FTP server.
is it possible to read the attachment and then rename it .
How to achieve this solution because i could not find ASMA in sender mail adapter . so could not use Dynamic configuration.
Regards,
Ravi
Edited by: Ravi Maheshwari on Feb 16, 2012 1:50 PM
This blog could help you
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6107
Similar Messages
-
Email attachment name in sender mail adapter to the receiver file adapter
HI ,
Ths is regarding email to file scenario. I am trying to create file (in rceiver file adapter) with the same name as the email attachment that i read from mail sender adapter. I want ro use adapter module for this. I could find from blogs that there is module - GetAttachmentName - available that i can use for this in sender mail adapter.
Can you please let me know what whetehr i neeed to mention any module key and parameters for this.
I assume , i need to do following steps :Please confirm.
1. i can use this module - after payload swap module and before standard mail adapter module in sender mail adapter
2. select ASMA option in advanced tab in sender mail adapter
3. In receiver file adapter select ASMA option in advanced tab in sender mail adapter
4. Also select file name option in ASMA in sender mail adapter
Thanks,
VamsiHi Vamsi,
your scenario is also described here: Re: sender mail adapter - attachment name
If you use the Module getAttachmentName, which is described here,
http://wiki.sdn.sap.com/wiki/display/XI/AdapterModulePI7.0GetAttachmentName
your scenario should work as you described it.
You just need to make sure that the Attachment Name that you read in the first place, is mapped to the Filename Attribute of the
Fileadapter (http://sap.com/xi/XI/System/File/FileName).
regards,
Daniel -
Sender Mail Adapter - html body mail
Hello Everybody,
I'm facing this strange problem:
I receive an e-mail with an XML attachment with a sender mail adapter and I use the PayloadSwapBean to let the attachment be the real payload as explaned in this blog
<a href="/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step:///people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
If I receive mail in text/plain format everything works fine, but as soon as I get an email with an html body (content-type: multipart/alternative; boundary=...) it doesn't any more (In the XI Monitor i still se 2 payloads, but I can only open the one with the attachment).
In this case the mapping is stuck in "scheduled for outbound process" status and the XI queue gets blocked with status "SYSFAIL" giving this error "Access via 'NULL' object reference not possible".
Is there any way to force XI digest also HTML e-mails?
As always, thanks a lot for your help.
DanieleThanks Akshay,
this really worked!
Fyi I'm using XIPAYLOAD option. I added in the module chain, before the PayloadSwapBean, a MessageTransformBean with this parameter:
Transform.ContentType - text/plain;charset=uft-8
this way I can also see the massage body in the monitornig.
Hope this will be helpful for someone else.
Regards,
Daniele -
Sender Mail Adapter Error: exception caught during processing mail message;
HI , I am configuring mail to file scenario. Need to read mail content (no need to capture From,TO or Subject details) and create a file with the content in the mail.
Need to read mails from microsoft outlook. Exchange server has been configured for POP3 protocol.
Following are the details provoding in sender mail adapter:
URL: provided url in the format: pop://<server name>
Authentication method: plain
provided user credinetions to access mails.
poll interval - 1min
content encoding none.
processing parameters : quality of service-exactly once
Since there is no need to capture From,TO or Subject details, didn't select the option - use mail package.
Verified for unread mails in the mail box and made sure that there are few unread mails.
Also, created data types and other components in IR and completed mapping.
But after starting sender mail communication channel, getting error "exception caught during processing mail message; java.lang.NullPointerException" in RWB-adapter-communication channel monitoring.
please let me know what needs to be done to resolve this error.
Thanks.HI Stefan, i tried, but still it is giving same error. Yes, i am able to access outlook mail with the user credentials given in the communication channel to access exchange server.
I am using message protocol: xipayload . Also since i dont have to capture TO,from,subject details., created data type just with one element of type string, not in the standard format .Does this makes any difference. -
Dynamic file name of the attachment in sender mail adapter
Hi
I have configured a sender mail adapter which receives some attachments.
Right now the file name of the attachment is hardcoded to "MailAttachment-1" "MailAttachment-2" using the content-description from "AF_Modules/PayloadSwapBean" module.
I want to set it to dynamic ie. instead of "MailAttachment-1"... i want it with real name of the attach.
please suggest a solution w/o the need to develop a custom adapter module.
Thanks!
Regards,
Mariano.Thanks Prateek,
Now, i can see that the name of the original file is into the content type named as text/xml; name"name of the file.xml" when i send the email from outlook.
If i send it from hotmail, this is not happend.
Do you know why happend this?
If i always would have the original name inside the content type, my problem will be solved.
Edited by: Mariano Vidal on Feb 13, 2009 2:26 PM -
How to process a text file (mail attachment) using the sender mail adapter?
Hi guys,
Is it possible to process mail attachments using the sender mail adapter? Let's say I have a structured text file (attachment) which needs to be mapped and sent to target system.
Post please any thoughts or experience.
Thanks,
OlianHi Olian,
Have a look at these helpful links -
1. http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05&overridelayout=true
2. http://www.riyaz.net/blog/xipi-configuring-the-sender-mail-adapter/
3. http://help.sap.com/saphelp_nw70/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
Regards,
Sunil Chandra -
How to determine the protocol to use in Sender mail Adapter ?
Hi All
Can i use my Microsoft Exhange Server address while configuring Sender Mail Adapter .? If yes , then which protocol i can use out of IMAP and POP ?..
How do i determine which protocol i should use to connect to my exchange server ?
Thanks
rohanHi Rohan,
//Can i use my Microsoft Exhange Server address while configuring Sender Mail Adapter .?
Yes, you can.
//If yes , then which protocol i can use out of IMAP and POP ?..
You can use either of them. To know more on IMAP and POP, i would suggest you go through these links,
http://www.trincoll.edu/depts/cc/documentation/email/IMAP_vs_POP/default.htm
http://www.imap.org/papers/imap.vs.pop.brief.html
If your are using IMAP, you will have to specify, which folder from which you wnaty the emmail to be retrived, this is not needed for POP.
Hope this helps,
Regards,
bhavesh -
Sender Mail Adapter - forcing content as an attachement
Hi all,
We are using the Sender Mail Adapter to pull emails from the inboxes of some users of an exchange server. We use the Mail Package option.
We have noticed that the content of the emails are by-default added as attachments when there are no real attachments to the emails. However the content is not added as an attachment when one or more attachments are present in these emails.
Is there a way of forcing the Sender Mail Adapter to always add the content as an attachment and keeping the other attachments as well? and of course maintain the Mail Package message type as the main payload...?
Many thanks,
AldoHi Stefan,
Thanks for your reply. I am glad to hear that I am wrong again )
In your opinion is it possible to force the Outlook Exchange server to add the content attachment every time? I mean by doing some configuration on it...?
The reason why we would like to do this is because when - in the content tag of a Mail Package message - we have MIME message parts that are of content-type text/html we are having problems in decoding the html back to a readable format.
To do this we use the apache QuotedPrintableCodec Java class.
This works fine when the content type of the message is just text/plain but we get an exception when we try with text/html.
The exception we get is:
org.apache.commons.codec.DecoderException: Invalid URL encoding: not a valid digit (radix 16): 13
I don't know if this is because of the two character sets we have in the payload (utf-8 and iso-8859-1) or if it is for other reasons...
If you could help me figure out how to forward any HTML email to another system in a readable format it would be great.
Thanks for your support,
Aldo -
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. -
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. -
Using header paramter SHeaderX-MS-HAS-ATTACH in Sender mail adapter
I am trying to check if an e-mail contains attachment in reciever determintion
I set the Variable Header XHeaderName1 to be SHeaderX-MS-HAS-ATTACH
in Sender mail adapter
I added a condition in the receving determintation
XHeaderName1 = yes
I see the DynamicConfiguration tab in sxmb_moni and the value of SHeaderX-MS-HAS-ATTACH is "yes"
but the message fails with the error
No receiver could be determined
any ideas?Hi,
In Receiver determination you need to set SHeaderX-MS-HAS-ATTACH = yes instead of XHeaderName1.
As far my understanding, in receiver determination you need to verify the condition with SHeaderX-MS-HAS-ATTACH = yes (check with syntax also ie. case sensitive and all)
Thanks
Swarup -
How to download / read text attachment in Sender Mail Adapter IN XI
Hi
I would like to know how to download / read text attachment in sender mail Adapter & sent same attachment to target system using file adapter.
Please help how to design / resolve this concept.
Regards
DSRI would like to know how to download / read text attachment in sender mail Adapter & sent same
attachment to target system using file adapter.
Take help from this blog:
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
From the blog:
However in most cases
our message will not be a part of the e-mail's payload but will be sent as a file attachment.
Can XI's mail adapter handle such scenarios? Sure it can but with a little help
from the PayloadSwapBean adapter module
Once your message (attachment) is read by the sender CC, you can perform the basic mapping requirement (if any) to convert the mail message fromat to the file format.....configure a receiver FILE CC and send the message...this should be the design...
Regards,
Abhishek. -
Non XML attachment to XML in sender mail adapter
Hi,
I am working with sender mail adapter and usng payloadswapbean. My attachment is non XML and I need to convert it in to XML in order to mapping. How can I do that? Can someone explain if can I use MessageTransformBean for this purpose and if so, how?
Or any other method for doing this?
Thanks,
RakeshIs the attachment in text format? If yes, then after the usage of PayloadSwapBean, you may try using MessageTransformBean in the same module chain. And you will be able to convert it into xml format.
Regards,
Prateek -
Different Attachment extension(.xls,.txt) in sender mail adapter
Hi Experts
Is it possible to use different type of attachment extension (e.g .xls,.txt) in the sender mail adapter?
My requirement is , the attachment in the mail adapter will be used as the main payload.So I am using PayloadSwapBean adapter module.
Currently I am using the following module key for .xls attachment and it is working.Configuration for .xls attachment is as follows
swap.keyName-Content-Disposition
swap.keyname-Content-Description
swap.keyName-Content-Type
swap.keyValue-attachment;filename="MailAttachment-1.xls"
swap.keyValue-MailAttachment-1
swap.keyValue-application/vnd.ms-excel.
Now, the attachment may be .xls or .txt file.
Now If I want to use .txt atachment then do I need to define all these parameter again and in that case what will be my content type for .txt file.
Your inputs required
thanks
AyanPayloadSwapBean will only convert the attachment as the main payload.
Yeah for reading excel file I have a separate custom adapter module.This is not in the scope of my question..
All I am asking , can .txt as well as .xls attachment be used in the same sender mail adapter.
If that is possible what will be my content-type for .txt or can I remove content-type and use only content-disposition and content-description so that any type of attachment it can recognise.
The momment I am specifying content-type , I am making it particular that only say .xls attachment , it will identify.
I hope I make you clear.Inputs required
Thanks
Ayan -
Issue with reading attachment in sender mail adapter
Hi, I am working on Email to file scenario, where I have to connect to exchange server and take the attachment of the email (xml file) and save it on to PI server. I have configured sender mail communication channel with following details:
Protocol: POP3
Message protocol: XIPAYLOAD
Mail attributes: keep attachments
Module:
1 localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean 1
2 localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
1 swap.keyName Content-Description
1 swap.keyName Content-Description
1 swap.keyValue attachment,filename="MailAttachment-1.xml"
1 swap.keyValue MailAttachment-1
Also, configured receiver file adapter.
Since I donu2019t have to read mail content , I havenu2019t created any design components in ESR. I have just refrred to dummy namespace, interface (both sender and receiver). in receiver determination, interface determination, sender agreement and receiver agreements.
It was working fine, not sure what changes happened. Now I could see the attachment payload in message monitor.
Under Inbound message->payloads->
MailMessage ( text/xml;charset=utf-8 )
MailAttachment-1 ( text/xml;name="****************")
But the fille that is getting created doesnu2019t have the contents of the attachment (xml file) . It has some other information, shown below:
Directory: ******
Name: ********.xml
=NextPart_002_01CB2C5B.B033B325#
content-type:text/plain;charset="us-ascii"#
content-length:30#
content-transfer-encoding:quoted-printable#
<<**********.xml>>=20#
=NextPart_002_01CB2C5B.B033B325#
content-type:text/html;charset="us-ascii"#
content-length:#
content-transfer-encoding:quoted-printable#
=NextPart_002_01CB2C5B.B033B325 #
Can you please let me know what is going wrong here.using following parameters in module resolved my problem:
MOdule name Type Module Key
AF_Modules/PayloadSwapBean Local Enterprise Bean transform sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
Module Key Parameter Name Parameter value
transform swap.keyName Payload-Name
transform swap.keyName MailAttachment-1
Maybe you are looking for
-
Poor RAM management in Photoshop CS4 - need help!
I have done numerous hours of research over the years only to give up and come back to this subject later on. I will try again! I must ask: is there ANY way to get Photoshop CS4 to automatically flush used RAM after closing image files? I'm tired and
-
I hope someone can help me!!!!!!! I'm trying to get started with itunes but my itunes store page is in french! I am not french and therefore can't read it. It means I can't set up my account. Does anyone know how I change the language selection- plea
-
What are the query types,Objects CRM provides for third party
What are the query types,Objects provided by the CRM so that it can be called by third party for integartion pupose.
-
InDesign 5 'quit unexpectedly' after deleting preferences & even reinstalling
InDesign 5, after restarting my computer this morning, keeps crashing immediately when I try to open the software. I have no idea why because it worked fine before the restart. I tried deleting (all of them indicating from the forums) preferences: ~/
-
Authentication anomaly!! I have been testing 802.1x authentication on wired networks. When deploying machine certificate (Windows 7), machine gets certificate, then turned on PEAP-MS-chapv2, everything works OK. Machine checks NPS servers certificate