cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get source file content as mail body in file to mail scenario

former_member192295
Active Contributor
0 Kudos

Hi Friends,

I am facing one problem with one of my file to mail scenario in PI(SP9). I have done bypass scenario(without IR only with ID objects). Scenario is working fine, i am getting mail also. But my requirement is i want complete source file content as a mail body (not xml format, text format). I have checked all options, but configured scenario bydefault taking source content as a attachment and mail body is empty. I have tested below options

1. If i choose message protocol as FCC mechanism at source side content at target side i am getting xml format as a attachment( In mail adapter i have selected message protocol as xi payload, and without packate option on mail adapter). If i choose message protocol as xi all, i am getting 2 files as a attachment (one file as a payload content and second file as a source file content in xml format).

2. If i choose message protocol as file at souce side that time i am getting source complete content as a attachment at target side in xml format, but mail attached file content is flat file(.xml extension) format. When i tried to open attachment file that time i am getting error in explorer, but i can see only one row in explorer remaining rows unable to see.

Please share your ideas on this.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member192295
Active Contributor
0 Kudos

Hi Friends,

My problem has sorted out myself.

Former Member
0 Kudos

Hi,

Do you have any inputs to my problem...

What should be the source and the target message type. Should I only use that XSD file specified.

Regards,

Nithiyanandam

Former Member
0 Kudos

Hi,

I am trying to work on file to mail scenario, please provide me the inputs regarding the configuration details of the adapters, File sender and Mail receiver along with all the parameter and the user details which i need to provide.

Is there any module configuration that needs to be done..

Also let me know how did you do the file bypass scenario test.

Please provide the inputs..

Thanks

Regards,

Nithiyanandam

former_member192295
Active Contributor
0 Kudos

Hi,

Follow below steps

1. First basis level need to configure setup(SMTP) for mail. After that only mail will go from SAP.

2. Source side depending on requirement take communication channel(idoc, file etc)

3. Receiver side communication channel take mail adapter and configure below setup

3.1 select message protocol XI ALL/ XI PAYLOAD(WITH PACKAGE or WITHOUT PACKAGE)

3.2 if message protocol is XI ALL, the complete content will be sent as a attachment along with payload file

3.3 if message protocol is XI PAYLOAD, the source message, the source message will be sent as attachment. Playload file filter automatically.

3.4 If you use PACKAGE option on mail adaper, this time source strucute need to import from SAP (some standard structure only will be support, without strucutre we can't work). If you choose package option no need to give mail id on communication channel, we need to pass mail id's from source structure.

I hope now clear.

Former Member
0 Kudos

Hi,

I did refer to this blog content only which you have provided:

/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure

My query was, what will be the connection parameter details for the mail server, and what user name and password should we provide there. As we are working from clients location, I need to know whether we need to have access to the mail server login or not. Also can the from and to address be any of the address my personal mail id, as we dont have any mail account from the client's server or mail box.

Regards,

Nithiyanandam

Edited by: Nithiyanandam A.U. on Dec 26, 2008 10:35 AM

former_member192295
Active Contributor
0 Kudos

Hi,

I have refered your blog also before my configuration. On mail adapter we need to configure below parameters.

1. Transport protocol should be SMTP

2. Message protocols you can select based on your requirement XI ALL/XI PAYLOAD

3. Path should be

SMTP:
<IP Address>\
(this is mail exchange server address)

4. From mail address you can give any mail id (<org/dept name@company name>. No need valid id

5. To mail address should be recognized mail id else will throw error

6. Subject you can mentioned any valid subject description

I hope now clear

Former Member
0 Kudos

Hi,

Thanks for the Inputs...

I am not getting the file name as what I specified, instead I get the attachments as "Untitled.xml" and other file as "noname". Do let me know what is the problem. Also I have made the data type and message types and not used the XSD which was specified.

Regards,

Nithiyanandam

former_member192295
Active Contributor
0 Kudos

Hi,

This is due to encoding, check it on mail adapter. I am also getting attachment file with AT00002.xml file name as attachment.

Former Member
0 Kudos

Hi,

Is there any other module parameters that needs to be set.

Regards,

Nithiyanandam

Former Member
0 Kudos

Hi,

As mentioned earlier, I am able to receive the mails with two attachments when I am using XIALL, but without proper name. I am getting it as Unknown.xml and other file as noname.

While when I am using XI payload with or without mail package it is not working.

Please provide the necessary details.

Regards,

Nithiyanandam

former_member192295
Active Contributor
0 Kudos

Hi,

I think through adapter specific message attribute option we should get file name as source, check it. Whenever use package option we should use mail receiver data structure should be SAP specified structure (i have down loaded from service market place). After use this structure i am able to see file text in mail body.

Former Member
0 Kudos

Hi,

u2022 To get email attachment file name as standard file name, we can achieve by using standard Mail XSD.

<Content_Type>text/plain;name="file.csv"</Content_Type>

<Content_Disposition>attachment;filename="file.csv"</Content_Disposition>

<Content>Sample Text</Content>

Check the parameter "keep attachments" to receive a mime type "multipart". Else the mail clients will not display the mail attachment as attachment.

u2022 To get Attachment as mail body keep Message Protocol = u201CXIPAYLOADu201D with u201CMail Packageu201D

u2022 If we checked u201CKeep Attachmentsu201D in u201CMail Attributesu201D then, the content will be sent as an attachment otherwise, the content will be sent as body of the mail . You can refer link,/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure to get content as mail body.

stefan_grube
Active Contributor
0 Kudos

If you use Microsoft Outlook, the mail from mail adapter will always displayed as attachment, not as body.

There is nothing you can do here.

Regards

Stefan

former_member192295
Active Contributor
0 Kudos

Hi,

Thanks for your information, but i have tested in lotus notes mail box also. In lotus notes also getting same thing. Where i can get body message(is it possible only on rediff, yahoo etc windows, please confirm).

I have tried without FCC (source file adapter), that time i am getting flat file (xml format) as attachment, but when i try to open attachment(in explorer) i am able to see one row in attachment in xml file, remaining rows i am unable to see it is throwing some style sheet error. (if i open attachment in notepad mode(after save in local disk) i am able to see all records).

Please share ideas on this

Edited by: NALLAM GUNA RANJAN on Dec 26, 2008 11:00 AM

former_member192295
Active Contributor
0 Kudos

Hi,

We can get message in mail body also, for this we need to use package option