Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Filter emails based on "From" of mail package

My sender mail adapter is picking up all emails from an email account and processing the file attachment - This is working fine.

The problem is that it processes everything sent to this email account even junk mails - resulting in XI alerts. How can I ignore the junk emails and only process emails sent from a certain source???

I see that we have "use mail package" and when I check this I get two payloads when I look in the monitor:

PAYLOAD 1: MailMessage:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Inbound Message

-->

- <xim:Mail xmlns:xim="http://sap.com/xi/XI/Mail/30" encoding="base64">

<Subject>Test - use mail package</Subject>

<From>"Wood, Lynn" email address removed</From>

<To>"bcdinvoices, sapxd1" email address removed</To>

<Content_Type>multipart/alternative;boundary="_000_91543CF4B231AE46B0B72867A9775AFE75E2BDB4B0SFLDMIEX001fe_"</Content_Type>

<Date>2008-10-15T13:04:05Z</Date>

<Message_ID><91543CF4B231AE46B0B72867A9775AFE75E2BDB4B0></Message_ID>

<Content>LS1fMDAwXzkxNTQzQ0Y0QjIzMUFFNDZCMEI3Mjg2N0E5Nzc1QUZFNzVFMkJEQjRCMFNGTERNSUVY

etc........

RTc1RTJCREI0QjBTRkxETUlFWDAwMWZlXy0tDQo=</Content>

</xim:Mail>

PAYLOAD 2: MailAttachment-1 - which is my attachment with data which I process

<?xml version="1.0" encoding="utf-8" ?>

- <ns:MT_BCD_INVOICES xmlns:ns="urn://federalmogul.com/BCDTRAVEL/FINGLOBCD001/00">

- <RECORDSET>

<COST_CENTRE>90200955</COST_CENTRE>

<EMPLOYEE_ID>66230</EMPLOYEE_ID>

<PRODUCT_GROUP>VSP</PRODUCT_GROUP>

<COMP_CODE>FEDERAL MOGUL FRICTION</COMP_CODE>

<BCD_ACCOUNT>3301419</BCD_ACCOUNT>

<INVOICE_DATE>20080811</INVOICE_DATE>

<TRAVELER_NAME>PIERREY</TRAVELER_NAME>

<TRAVELER_FIRST_NAME>JEAN FRANCOIS</TRAVELER_FIRST_NAME>

<INVOICE_NO>8212654</INVOICE_NO>

<AMOUNT_EXCL_VAT>15.00</AMOUNT_EXCL_VAT>

<CURRENCY1>EUR</CURRENCY1>

<AMOUNT_VAT>0.00</AMOUNT_VAT>

<CURRENCY2>EUR</CURRENCY2>

<AMOUNT_DOC_CURRENCY>15.00</AMOUNT_DOC_CURRENCY>

<CURRENCY3>EUR</CURRENCY3>

</RECORDSET>

</ns:MT_BCD_INVOICES>

Can I pick out <From>"Wood, Lynn" email address removed</From>

To check it is the correct FROM - ie. only process emails from a certain sender????

Is this possible??? And how do I do it???

I already use payloadSwapBean and messageTransformBean to swap the attachment for payload and to format the file.

Please do not send me endless links to anything email related !

Not what you were looking for? View more on this topic or Ask a question