Skip to Content
avatar image
Former Member

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

-->

- 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" ?>

- 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 !

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Oct 16, 2008 at 12:11 AM

    hi,

    how abt a filter condition at mapping level using eualsS and createif functions and etc .....have you tired that?

    not sure if it is 100% solution but just giving another thought.........

    regards.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 09:43 AM

    Yes this is pretty much what I thought to do - my problem is what do I check in the UDF. I need to get the "From" field into the header. I see that you can do it if you check "Use Adapter Specific Message Attributes" and "Variable Transport Binding" then you have available in the header SHeaderFROM which you can then get in the mapping. But we are on SP19 and we do not have "Variable Transport Binding" on the Sender Mail adapter - nor an advanced tab page - only an advanced mode check box and additional parameters.

    So not sure how I can get the "From" field into mapping??? Any ideas anyone?

    Add comment
    10|10000 characters needed characters exceeded