cancel
Showing results for 
Search instead for 
Did you mean: 

Need help on sending dynamic mails with attachments

Former Member
0 Kudos

Hi all,

I'm a newbie to XI and presently exploring the features in it.. I need a lil push on using the receiver mail adapter. The requirement is that i have two source files and i have to combine these two source files and send a mail. lemme expalin it below..

Two source structures

<Struct1>

<Id>

<Details>

</Struct1>

Second structure :

<Mail>

<From>

<To>

<Subject>

<Content>

</Mail>

Now, The mapping is :

<Subject> = "Some Message" Concat() Id

<Content> = <Details>

Till here i know how to do. But, the real problem is i need the <Struct1> as an attachment to the mail which contains the data in <Content> as inline.. How can i do this ?

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

I'd do it in the adapter module

take the whole structure of two files (do the concat etc)

and in the adapter module cut the <Struct1>

and put in the attachment section of the SOAP message

and leave the rest

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

Do you mean to say i should use PayloadSwapBean? But how can i access the SOAP message in the module ? I am completely naive to XI and have just started using XI.. Can you please elaborate your solution ?

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>>

Do you mean to say i should use PayloadSwapBean?

no I'm not sure if this will work in your case

you can create your own adapter module and

access the message from there

and then put anything in the SOAP attachment

Regards,

michal

Former Member
0 Kudos

I cannot create a custom adapter because i need to use the mail adapter functionality. If i go for custom adapter, i will have to code the mailing part too~!

In one of your blogs you explained the usage of dynamic mail id's. Is there any other structure other than the one u gave ? Some kind of standard structure which has an attachment field also in it..

I tried creating a custom xsd with all the fields that i need, but the mail adapter keeps giving me error :

Mail: error occured: com.sap.aii.messaging.util.XMLScanException: expecting start tag: Mail, but found {}Mail at state 1.

Probably it is expecting the same namespace even in my custom xsd and if i give same name, it would obviously expect the same strucutre. isnt it ?

MichalKrawczyk
Active Contributor
0 Kudos

>>>>I cannot create a custom adapter because i need to use the mail adapter functionality. If i go for custom adapter, i will have to code the mailing part too~!

I was talking about adater module

not adapter

adapter module is like an exit to standard adapter

it enhances the standard adapter

Regards,

michal

Former Member
0 Kudos

Ooops! i thought it the other way! I think module creation wouldnt be a problem. Do you have any pointers on how to create the adapter modules? i'm searching on sdn.sap.com, but couldnt find one till now..

And yeah! Thank you very much for helping me in the right direction. Otherwise i would still be nagging with adapter and mail structure.

Regards,

Qadeer

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Take a look at this document,

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a">How to create Modules for the J2EE Adapter Engine</a>

Regards,

Bhavesh

Former Member
0 Kudos

Thanks Bhavesh, but due to some reason,i'm unable to open this pdf file. It says there was an error downloading this file. However, i've seen a cached version (html) of it and this module development would require access to sap netweaver development studio, to which i dont have access. I'll get the access tomorrow and would give it a try.

Anyways, thanks a lot Michal & Bhavesh for your valuable inputs.

Regards,

Qadeer

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

Netweaver developer can be downloded from SDN

(it's free)

and you can bulid all adapter modules you ever need

Regards,

michal