cancel
Showing results for 
Search instead for 
Did you mean: 

Reg:Receiver Mail Adapter

Former Member
0 Kudos

Hi ..

I am using Mail adapter at reciever side.

I am using Mail package for this.

I have selected SMTP as Transport Protocol.

and I have selected XIPAYLOAD as Message Protocol

in URL i ahve given in the below format.

SMTP://host ip address:port

I have checked Use Mail Package option.

In Content Encoding i have selected None.

While executing the scenario, i am getting the below error in channel monitoring.

.

Message processing failed. Cause: com.sap.aii.af.sdk.xi.srt.BubbleException: Failed to call the endpoint [null "null"]; nested exception caused by: com.sap.aii.af.sdk.xi.srt.BubbleException: Unknown encoding name for the mail content: [null "null"]

Thanks,

Leela

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Suraj,

Thanks for your reply. I have used only java mapping for sending mail as an attachment. And to place the file i have used file to file scenario without any mappping. and in interface determination i used maintian order at runtime so that when the file is placed in the target directory then only java mapping will be executed and mail is sent.

Thanks,

Leela

Former Member
0 Kudos

Hi..

I need one help reg the attachment in mail. i want to create an email with standard text and the input file as attachment.

I have searched on SDN but i only one option at a time is possible.

I have used the below link as reference.

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

Can you help inother ways to go...

Thanks,

Leela

former_member187339
Active Contributor
0 Kudos

Hi Leela,

>>standard text and the input file as attachment.

That weblog does this and yes that is the only possible method

Regards

Suraj

Former Member
0 Kudos

Hi Suraj,

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

I got the attached mail and body content separately..

But i want to use the java maaping in my UDF. because we are having dependency.Whenever the file is placed in recievr folder, then only we need to send mail.

so we are doing 1: N mapping. reciever side we used 2 structures. one for file and other is mail xsd.

and we need the file name and file content dynamically. In the weblog they hardcoded the filename and other details.

So can you please help in writing the UDF for the java mapping..

I have removed the code from the java mapping andmodified as ashown below.

protected static void copySource(InputStream in, OutputStream out)

throws IOException {

int c;

while ((c = in.read()) != -1) {

switch (c){

case '&': out.write("&".getBytes()); break;

case '\"': out.write(""".getBytes()); break;

case '\'': out.write("'".getBytes()); break;

case '<': out.write("&lt;".getBytes()); break;

case '>': out.write("&gt;".getBytes()); break;

default: out.write(c);

}

}

Is there anything to add ? Can you please suggest.

Regards,

Leela

former_member187339
Active Contributor
0 Kudos

Hi Leela,

I am still confused..

Are you trying to do this:

1. Using multimapping post a file and send a mail

2. The parameter named mailContent will become the body of the email.. You have to put any hardcoded value in it

3. You want the attachment name and content to be made at runtime. So the parameter attachmentName can be given a value using DynamicConfiguration

4. Also see that the mailContent is having Content-Type: text/plain; charset=UTF-8" & "Content-Disposition: inline" , but the attachment has "Content-Type: application/xml; name=" "Content-Disposition: attachment; filename="

So one becomes the mail body and another one attachment

But once you do a multi-mapping, if you invoke this java code there will be a problem. As you want this java mapping to work only on the mail part and not on the file part.

>>But i want to use the java maaping in my UDF.

You meant the logic in the udf? This is not possible as out.write cannot be used in a UDF

Regards

Suraj

santhosh_kumarv
Active Contributor
0 Kudos

>>In Content Encoding i have selected None.

Any reason to set the content encodin to none?

If no, set it to base64. Refer the below blog

Ma[Mail Adapter scenarios u2013 SAP Exchange Infrastructure|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1798] [original link is broken] [original link is broken] [original link is broken];

~SaNv...

former_member187339
Active Contributor
0 Kudos

Hi Leela,

Check this blog:

/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address

Try to give the encoding mentioned in it.

update

After searching SDN i found , if y ou have not checked this then give it a try

Regards

Suraj

Former Member
0 Kudos

Hi Suraj,

Thanks for your reply. Now i am able to recieve the mail.

Regards,

Leela

rajasekhar_reddy14
Active Contributor
0 Kudos

then its goods..mark the thread ANSWERED