on 03-17-2010 12:39 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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("<".getBytes()); break;
case '>': out.write(">".getBytes()); break;
default: out.write(c);
}
}
Is there anything to add ? Can you please suggest.
Regards,
Leela
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
>>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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.