cancel
Showing results for 
Search instead for 
Did you mean: 

MIME format in Mail adapter

nisarkhan_n
Active Contributor
0 Kudos

Hi All

I am currently using the email receiver adapter with mail package and able to send the MIME messgae format from the content field of the mail package.

i am sending 3 attchments from MIME format in content, when i use the Mail package i cannot send the BCC and CC fields in that, so i have chnages my configuration to send the MIME message with attachments without using the mail package but i am not able to receive the mail with attachment.

when i send the MIME fomat without using the mailpackage entire format cmes as mail content...with MIME header and other details.

How do i specify the mail receiver adapter to recoginze the message as MIME and send content and attchment in that.

i have included the MIME header also.

kindly let me know about this.

regards

Nisar Khan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

help.sap.com/saphelp_nwpi71/helpdata/en/4e/c153426da9bd30e10000000a155106/content.htm

this will be useful 4 u

stefan_grube
Active Contributor
0 Kudos

It is very tricky to send a multipart message from a single payload without the Mail Package. You can use the MessageTransformBean and set content-type there as multipart.

But I think you could also use mail package and set the cc and bcc in the adapter specific message attributes.

Regards

Stefan

nisarkhan_n
Active Contributor
0 Kudos

Hi Stefan,

Right now i am sending the MIME message using the Mail package, but Adapter specific message attributes is not valid when i use the Mail package, i cannot use adapter message attributes to overwrite CC,BCC fields.

I can use the adapter specific message attributes only when i am not using the mail package, i tried overwriting the CC and BCC fields with mail package but it doesn't overwrite because of this reason i am switching back to without using the mail package.

correct me if i am wrong, i have tried to overwrite CC,BCC field by using Mailpackage its not supported.

regards

Nisar Khan

stefan_grube
Active Contributor
0 Kudos

> correct me if i am wrong, i have tried to overwrite CC,BCC field by using Mailpackage its not supported.

This is correct. CC and BCC are not possible with mail package.

So you can try using the MessageTranformBean and set the content-type there.

Regards

Stefan

nisarkhan_n
Active Contributor
0 Kudos

Hi Stefan,

when i use the MessageTranformBean and set the content-type there as "

multipart/mixed;boundary="--XYZ", how should be my inbound strucutre should?

Should i have to pass only the MIME content like this

>----XYZ Content-Type: application/html;charset=base64 name= EmailMessage.html Content-Disposition:attachment; filename=EmailMessage.html This is an Attachment file -


XYZContent-Type: text/plain; charset=UTF-8 Content-Disposition: inline This is an Test Mail

I dnt have to pass the MIME header right? i tried working passing the MIME header it doesn't work any clue

on this?

By passing the content type as Multipart should this work?

regards

Nisar Khan

stefan_grube
Active Contributor
0 Kudos

> Should i have to pass only the MIME content like this

>

> >----XYZ Content-Type: application/html;charset=base64 name= EmailMessage.html Content-Disposition:attachment; filename=EmailMessage.html This is an Attachment file -


XYZContent-Type: text/plain; charset=UTF-8 Content-Disposition: inline This is an Test Mail

In principle yes, but don't forget the obligatory new lines.

See this blog for an example, just take the part inside the content tag:

/people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping

Regards

Stefan

nisarkhan_n
Active Contributor
0 Kudos

Hi Stefan,

I tried passing the MIME strucutre in the same way as in your blog, but i am not getting the output in a proper way, i am getting the attachment but no content in email.

i tired with the various combinations ofr MIME formats, the content doesnt come only attachments appear.

have passed the obligatory lines also and (content type is multipart with boundary detail)

Lot of the email notifations to the customers have CC and BCC fields and multiple attachmetns genreteated in mapping like HTML, XSL etc....this is imp part of our design and we dont want to use any module developemnt for this.

let me know have you tried this, does this work?

regards

Nisar Khan