Skip to Content
avatar image
Former Member

File to Mail using Mail Package

Hello,

I have a requirement where we receive a csv file having mutiple columns, one of them being the email address.

I need to get this email address from the file and send this file as an attachment to the same email address.(Dynamic email address)

I have used the Mail xsd and have done graphical mapping to achieve this.

Now,the problem is,if I use Mail package for dynamic email address,I am not able to get the source file as an attachment because the payload here is a mail structure.

If I get source file as an attachment using PayloadSwapBean and MessageTransformBean,I cannot have dynamic email address.

Can anyone please suggest a solution to this?

Thanks in advance for your help.

Regards,

Shweta

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jun 23, 2009 at 07:44 AM

    Hi...

    Can you try like using Mail package for dynamic email address, and use(Check) the "Keep Attachments" in the Receiver Mail adapter communication Channel.

    Regards,

    Leela

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 23, 2009 at 08:28 AM

    Use Adapter-Specific Message Attributes for this.

    There is a field for mail receiver.

    Regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Stefan and Leela,

      I am not sure,what worked finally,but it is working fine now.

      I made these settings:

      Sender File adapter : PayloadSwapBean

      Receiver Mail adapter : MessageTransformBean ,Use Mail Package, Keep Attachments.

      Thanks for your help.

      Regards,

      Shweta

  • avatar image
    Former Member
    Jun 23, 2009 at 02:18 PM

    Problem solved

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi JC,

      Sorry for replying late as this thread was closed,I didn't have a look at it.

      Please follow these steps:

      IR:

      1)Create an external definition using standard Mail schema ximail30.xsd.

      2) Convert attachment to XML and map From,To,Subject,Content fields to the target mail structure.

      ID:

      1) Use PayloadSwapBean in File Sender to create attachment.

      2) Select Keep Attachments and Use Mail Package in Receiver mail adapter.

      3) Use MessageTransformBean to have Message Disposition as an attachment.

      I hope this helps.

      Regards,

      Shweta