cancel
Showing results for 
Search instead for 
Did you mean: 

File to Mail Scenario

itabhishek9
Participant
0 Kudos

Hi SDNites,

In File to Mail scenario, everything is working fine (Getting the file name using UDF, getting the email ID using RFC look up) except attachmnet not being sent.

Also attachment is not visible in the payload of sender and receiver.

Regards,

Abhishek

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Abhishek,

are you using the module localejbs/AF_Modules/MessageTransformBean ?

Cheers

Hidayat

itabhishek9
Participant
0 Kudos

I have not used Beans in the past but what I know about the above is that it will be used to convert the plain text to XML and Viceversa. Please correct me if it served the additional purpose as well. Also if the same can be used for attachment can you pleaes elaborate? Note : I have used mail package on the receiver side and also checked the keep attachment flag. Regards, Abhishek

engswee
Active Contributor
0 Kudos

Hi Abhishek

If you are using Mail Package (which is deprecated by the way), you will need to populate the Content field in the XML target structure. For attachments, you will need to set the Content Disposition accordingly as well as the content from your input file. Please find an example in the answer of the following thread.

How send e-mail with XML + PDF and body text

If you plan to send the input file unconverted as an attachment, and without any content in the email body, it is easier to just NOT use Mail Package. That way, your MainDocument payload just becomes an attachment in email. You can refer to my answer in the following thread for more details.

Adapter Mail Receiver PI 7.1 - THeaderCC doesn't work

Rgds

Eng Swee

markbernabe
Active Participant
0 Kudos

Hi Eng Swee, I have a similar problem. So my scenario is File -> Mail. I just have to pick up the file and send it via Mail as attachment. Simply email the file with the exact same name and format - no mapping, no changes to the file, no more and no less. I have created an ICO for that with a mail receiver channel that doesn't use Mail Package and only Keep Attachments. So the file is getting picked up and email is getting sent as well. The only problem is that, the file attachment in the email becomes 'MainDocument.bin'. I hope you can advise me so that the exact same file will be attached in the email. Thanks! Mark

azharshaikh
Active Contributor
0 Kudos
itabhishek9
Participant
0 Kudos

Hi Azhar,

Thanks for the reply.

I have already seen both the links and they have been explained very well. The difference in my scenario is that I do not need to read the file content (I have to read only file name which I did by using UDF), I have to just pick up the file from the shared directory.

Once I have obtained the file I need to email this file using file adapter.

Regards,

Abhishek