cancel
Showing results for 
Search instead for 
Did you mean: 

Attachment Handling in SAP PI Sender Mail Adapter

0 Kudos

Hello Guys,

I have a Production interface of Sender Email Adapter reading an attachement with a specific name(using the payloadswap bean).

However,Off late, I also see a lot of junk mails without attachment being picked up by the adapter and failing in the integration engine.

Is there a way by which I can make the mail adapter to process ONLY mails that contain a valid attachment with the name xyz.xml  and ignore junk mails without attachment?

Senthil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

No straight forward options, to my knowledge. you may need to get the attachment name, populate in dynamic header and then probably sort it out.

http://wiki.scn.sap.com/wiki/display/XI/Adapter+Module+PI+7.0+Get+Attachment+Name

you can think about, setting rules in the mailbox, for ex. moving the right mails with attachments to another folder and pick & send them to PI using the present sender mail adapter setup, probably simpler.

Good luck

Regards

Vishnu

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Senthil

You can write an Java Mapping or adapter module to read the attachment name. Then put the below conditions

if name =  xyz.xml 

then perform the exact task

else 

generate an empty message.

In your receiver adapter , choose the option do not create empty message. In this way you can ignore the error but only drawback will be it will increase the message count in PI.

praveen_sutra
Active Contributor
0 Kudos

Hi Senthilnathan,

Probably you can create a separate folder and create a rule in your mail box to redirect all the required mails to be processed should be moved to that folder.

And in the channel u can mention the folder name.

thanks and regards,

Praveen T

Former Member
0 Kudos

Hi,

Could you use receiver determination and conditions (Context Object) to check if attachment is named correctly?

Here's more help about this.

http://scn.sap.com/people/alessandro.guarneri/blog/2007/03/18/basic-spam-protection-for-xi-mail-adap...

Cheers, Mika