cancel
Showing results for 
Search instead for 
Did you mean: 

File to Mail using Mail Package

shweta_walaskar2
Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

shweta_walaskar2
Contributor
0 Kudos

Hi Leela,

Yes,I have done this,and then I get a blank attachment.

Thanks.

Regards,

Shweta

Answers (2)

Answers (2)

shweta_walaskar2
Contributor
0 Kudos

Problem solved

Former Member
0 Kudos

Hi,

I'm having the same problem. I want to send a mail to a dynamic adress with a file attatchment, but I don't know how exactly I start to do it ? Can you help me please ?

Thanks in advance.

JC.

shweta_walaskar2
Contributor
0 Kudos

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

stefan_grube
Active Contributor
0 Kudos

Use Adapter-Specific Message Attributes for this.

There is a field for mail receiver.

Regards

Stefan

shweta_walaskar2
Contributor
0 Kudos

Hi Stefan,

Thanks for the reply.

But I think,I am not able to understand the solution mentioned by you.

I can find following fields in ASMA mail adapter:

Meaning

Technical name

User

TServerLocation

Authentication Keys

TAuthKey

Mail header 'from' field

THeaderFROM

Mail header 'to' field

THeaderTO

Mail header 'Cc' field

THeaderCC

Mail header 'Bcc' field

THeaderBCC

Mail header 'subject' field

THeaderSUBJECT

Mail header field for reference to mail which is being replied to

THeaderIN-REPLY-TO

Mail header 'reply to' field

THeaderREPLY-TO

Mail header field for mail client program

THeaderX-MAILER

Mail header field for delivery acknowledgement

THeaderDISPOSITION-NOTIFICATION-TO

Mail header field for priority

THeaderPRIORITY

Mail header field for message importance

THeaderIMPORTANCE

I couldn't find a field related to attachments.

I can see the xml version of file in inbound message in SXI_MONITOR.

But after mapping,I get Mail package structure.

Could you please explain again.Sorry for this.

Thanks.

Regards,

Shweta

shweta_walaskar2
Contributor
0 Kudos

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