cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver Mail Adapter - attachment and content is sent as attachments in mail

Deepak_sap2211
Participant
0 Kudos

Hi Experts,

Good day..!!

Am facing some issue while sending the mail with content and attachment.

The content(body) and the attachment file are sent in mail as attachments only.

Interface Flow :

SOAP --> PI(7.31 dual stack) -->Mail

Receiver Mail adapter setting:

     transport protocol  = SMTP

     message protocol = XIPAYLOAD

     Use mail package and keep attachments are checked

Scenario :

Whenever the data is sent from the webservice, some trasformation is done and the data is sent to the "CONTENT" field as HTML format.

So, the below values are passed.

               CONTENT TYPE --> text/html;charset="UTF-8"

               CONTENT DISPOSITION --> inline

If an attachment is sent along with the actual message,that has to be passed as an attachment in the mail,as it is.

Issue :

     If a message is sent from the webservice without an attachment , this setting works fine (am getting the mail with body in HTML format)

     But if an attachment(.csv format) is also sent (with actual message) from the webservice,am getting a mail with empty mail body and two attachments (attachment.csv and main document).

Please assist me with a resolution.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member216164
Participant
0 Kudos

Deepak,

Develop your interface by referring following blog. It worked just fine for me.

Thanks,

Avinash

Deepak_sap2211
Participant
0 Kudos

Hi Avinash,

I tried this blog already.

This works fine if the mail content(body) is TEXT/PLAIN type. But my requirement is TEXT/HTML for body and .CSV for attachment.

With Regards,

Deepak

former_member183816
Active Participant
0 Kudos

What is the setting of Read Attachment in your operation mapping?

Chechked or Unchecked?

Deepak_sap2211
Participant
0 Kudos

READ ATTACHMENT in OM is checked.

Deepak_sap2211
Participant
0 Kudos

READ ATTACHMENT in OM is checked.

iaki_vila
Active Contributor
0 Kudos

Hi Deepak,

Have you tried to use MessageTransformBean and to set Transform.ContentDisposition with the value inline ?

Check this documentation Inserting MessageTransformBean in Module Processor - Adding Modules to the Module Processor - SAP Li...

Regards.

Deepak_sap2211
Participant
0 Kudos

Hi Iñaki Vila,

I tried using MessageTransformBean. But no luck

PFA - Screenshot of module in receiver mail adapter.

With Regards,

Deepak D

iaki_vila
Active Contributor
0 Kudos

Hi Deepak,

I see totally right your configuration.

You can try a little trick and to try to move the payload attachment to inline email with PayLoadSwapBean, check the page 8 in this document http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0964d7c-e66e-2910-24bb-ac535e4a5...

Regards,

Deepak_sap2211
Participant
0 Kudos

Hi Iñaki Vila ,

Again am facing the same issue. No luck

But when i download the attachments from mail and open them seperately,they are fine. (main document is having the HTML format and attachment as .CSV)

With Regards,

Deepak.

Deepak_sap2211
Participant
0 Kudos

Hi Inaki Vila,

I tried that as well..But no luck

Do i need to change the content type to MULTIPART ? not sure of this,though.

With Regards,

Deepak D

iaki_vila
Active Contributor
0 Kudos

Hi Deepak,

I've noticed that you are using outlook, have you tried to send it to a gmail account for example or to use another mail program?, i don't think this will be a mail program problem, but you don't lose anything to assure it.

Regards,

Deepak_sap2211
Participant
0 Kudos

Hi Inaki Vila,

I tried sending it to gmail account.but again having the same problem.It doesn't look like an issue with the mail account type.

Regards,

Deepak D