Mail Adapter Encoding Problem
Hi,
I use the Mail Adaper with Mail Package.
And i set Content-Encoding Quoted-Printable.
But i still can't send characters like öäü correct.
any idea? is there a second option i have to set somewhere?
regards,
robin
solved it.
you just have to set content type in mail package to text/plain;charset="UTF-8"
regards,
robin
Similar Messages
-
Mail Adapter Module Problem!
Hi All
I m facing a problem in implementing a custom mail adapter module.
The scenario is to set the content type based on the file type. eg: if the file being sent is a pdf then content type should be "application/pdf".
I hope the scenario is clear, please feel free to ask for clarifications.
awaiting your replies.
Regards
KapilHi All
I am able to fetch the file name now and set the content type based on the file name. But I m not able to change the name of attachment of mail. For reference, I m pasting the code here, please suggest how to do the latter part
try {
// CS_GETCHADAT START
cid = moduleContext.getChannelID();
Channel channel = new Channel(cid);
// Example to access a channel configuration parameter in a module: String someParameter = channel.getValueAsString("YourAttributeName");
// CS_GETCHADAT END
fileName = msgg.getMessageProperty("http://sap.com/xi/XI/System/File","FileName");
Payload attachment = msgg.getAttachment("MainDocument");
StringTokenizer st = new StringTokenizer(fileName, ".");
while(st.hasMoreTokens()){
extension = st.nextToken();
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "RenameFile: filename " + fileName);
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "RenameFile: extension " + extension);
// create new payload
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "RenameFile: attchmntName " + attachment.getName().toString());
//provide attributes and content for the new payload
attachment.setName("Attachment :" + fileName);
// msgg.setMessageProperty("http://sap.com/xi/XI/System/File","content-description",fileName);
attachment.setContentType("application/" + extension );
inputModuleData.setPrincipalData(msgg); -
Apple mail attachment encoding problem
I'm having the problem lately that either attachments aren't being decoded properly and the source is displayed in the email or that the entire email is being displayed like this:
--Apple-Mail-7--951337123
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
delsp=yes;
format=flowed
FYI
--Apple-Mail-7--951337123
Content-Transfer-Encoding: base64
Content-Type: application/octet-stream;
x-mac-type=584C5338;
x-unix-mode=0744;
x-mac-creator=5843454C;
name="report.xls"
Content-Disposition: attachment;
filename=report.xls
0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAA
EAAAQAAAAAEAAAD+////AAAAAAAAAAD/////////////////////////////////////////////
We have the same problems with UTF-8 encoded mails. If I select the Inbox, then select Mailbox -> Rebuild it fixes it, but I need a better solution to fix this. Several others are having the same problem and it seems to be happenning intermittently.
Anyone have any suggestions?
macbook pro 1.86Ghz Mac OS X (10.4.5)duren wrote:
Some of my clients cannot open these inline images.
This clients use presumably Outlook 2007. It's not your or Apple Mail's fault, it's a known bug in Outlook 2007 and there is also a Microsoft Help and Support Article from April 2007 about that issue.
Here -> http://support.microsoft.com/kb/917120
A workaround is also described there.
A simple ad hoc solution is to ZIP the pictures before attaching to mail
Lupunus -
Problem wiht sender mail adapter.
Hello.
I have a mail to RFC scenario.
There sender mail adapter fails if the mails in the inbox is encoded in specific formats.
I think the mail adapter does not understand this encoding.
Below is the error i got.
error occured: [2008-09-08T08:22:25Z] 5 new messages found; processing message 1exception caught during processing mail message[1]; java.io.UnsupportedEncodingException: utf-7; processing message 2exception caught during processing mail message[2]; java.io.UnsupportedEncodingException: utf-7; processing message 3exception caught during processing mail message[3]; java.io.UnsupportedEncodingException: utf-7; processing message 4exception caught during processing mail message[4]; java.io.UnsupportedEncodingException: utf-7; processing message 5exception caught during processing mail message[5]; java.io.UnsupportedEncodingException: utf-7; action[s] taken
Is there a solution 2 overcome this problem.
I tries to use a module called "TextCodepageConversionBean" but it was not of much use.
Please help.
Thanks,
VigneshHI
Mail adapter does not understand "UTF-7" as shown in the error.
Mail adapter supports only
base64
Quoted-Printable
http://help.sap.com/saphelp_nw70/helpdata/EN/23/c093409c663228e10000000a1550b0/content.htm
If you want to make your adapter more than this. Then create a custom module using open libraries that will allow you to read many Encoding standards.
Thanks
Gaurav -
Encoding conversion in Mail adapter
Hi,
we have a problem with the Mail adapter...
We try to send an email out of the XI to some service providers. The outgoing data is stored in an XML structure. This structure agrees with the conventions of the Mail Package format, which is used for dynamic Mail generation. The content of this Mail Package structure is a semicolon separated string, which should be attached as a CSV-File to the outgoing email. Up to this everything works fine. We get the email with the attachement out of the system, send it to a SMTP server and transfer it to a previous defined email address.
But when we open the attachement (with Wordpad, Excel,...) all german umlaut have been lost. The problem is, when transfering the Mail Package content into a File, this File is UTF-8 encoded.
Can anyone give us a hint how to convert the encoding of the attached file from UTF-8 to ISO-8859-1 (Latin-1)?
Actual we have set the following parameters on the module page:
Work sequence
1. localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean XML2Plain
2. localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
Modulconfiguration
XML2Plain Transform.ContentDisposition attachment;filename="ABC.csv"
XML2Plain Transform.ContentType text/plain;charset=latin-1
XML2Plain Transform.ContentDescription "ABC"
I hope we get some help...
Regards,
LarsHi,
Hi
We handled the similar requirement in our project.
To convert the target file encoding UTF-8 to ISO-8859-1. For this i have used XSLT mapping, by changing the output encoding as shown in the code.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="urn:abc.com:pi:ab:cd:FileToMail:Mail">
<xsl:variable name="vfileName" select="/a:MT_Mail/FileName"/>
<xsl:output method="text" indent="yes" encoding="iso-8859-1" media-type="TYP"/>
also set the charset value to ISO-8859-1 as shown in the XSLT mapping
<xsl:text>----mime-boundary
Content-Type: text/html; charset="ISO-8859-1"
Content-Disposition: inline
In Adapter module, add XMLAnonymizerBean
Link:http://help.sap.com/saphelp_nwpi71/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
Hope this will resolve your issue.
Regards,
Divya
Edited by: Divya_10 on Jun 14, 2011 10:20 AM -
Mail adapter multipart message problem
Hello everyone.
I'm experiencing problem with receiver mail adapter. In XIPAYLOAD mode (keeping attachments, use mail package, content encoding - none) messages that has multipart mime type (multipart/alternative exactly) are processing strange way (messages are made from MS Outlook). XI keeps service information and change some symbols words become unreadable. For example.
--_000_135E4C842D542241894122FD84C52E1D4134A33A81mail2itransit_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello world! This is text of multipart message! --_000_135E4C842D542241894122FD84C52E1D4134A33A81mail2itransit_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hello world! T= his is text of multipart message!
000135E4C842D542241894122FD84C52E1D4134A33A81mail2itransit_
You can see T= his instead of This. And also why in main payload (<Content> field) it keeps info about all parts of whole message.
Attachments are kept correctly.
Any suggestions how to avoid this problem and keep just useful info (just text with correct symbols)?
I'm running XI 7.0 SP18.
Thanks in advance.
Edited by: Yaroslav Isachenko on Mar 24, 2010 2:31 PM
Edited by: Yaroslav Isachenko on Mar 24, 2010 2:42 PMAn OSS would not help, as this is an Outlook issue.
As far as i know, multipart/mixed works with all mail systems. maybe you give a try?
Could you post the first lines of your entries in Content tag and the entry and content-type also? -
Hi,
I am having problems to get my sender mail adapter running.
I configured it with the following parameters:
<i>Transport protocol: POP3
Message Protocol: XIALL
Adapter Engine: Integration Server
URL: pop://server
username + pw
poll intervall: 1 Min.</i>
The adapter is active and if I look into the adapter monitoring everything seems to be fine (green light).
But the adapter doesn't poll the messages from the mail account and I cannot see any activity in the message monitoring.
If I try the same configuration with Thunderbird everthing works fine. Also my receiving mail adapter works without any problems for the same account.
Do you have any idea what the problem could be or how I could find out what my mail adapter is doing?
Thanks,
AndreasHi all, hi Andreas,
have you solved you problem? Could you please describe how you did it.
I have the same situation and I haven't any ideas how can I manage it.
I checked all parameters and compared they with documentation. Everything seems to be ok.
I didn't see any messages in the message monitoring, but in the chanel monitoring I found follows:
exception caught during processing mail message; java.net.ConnectException: Connection refused: connect
I tried the same configuration with email client and it worked. I tried change POP on IMAP with URL imap://server/folder. It didn't work also.
Could you please help me?
Thank you in advance,
Anna -
Problem with Sender Mail Adapter
Hi experts,
I'm developing a Mail-XI-RFC scenario and have a problem in the mapping. I have created a MI based in the structure of the attachment of the mail. I have a mapping that does xml->RFC and tests OK. When I send a mail to the account of the sender adapter, the system generates two payloads, the 'MailMessage' and the 'MailAttachment-1' that is the xml to map, but I have an error in SXM_MONI 'Cannot produce target element /ns0:...RFC name'.
The Sender Adapter configuration uses message protocol XIPAYLOAD, I have checked Mail Package, base 64 and keep Attachments. Interface namespace is the same as the xml and default interface name is the message interface created of type my xml.
What is wrong?
Best Regards,
Alfredo Lagunar.In this case you need to use payloadswap bean for swapping the payload and attachment
http://help.sap.com/saphelp_nw04/helpdata/en/70/f3cbad30ee479cb15672219f3405f0/frameset.htm
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step check this
Rajesh
Edited by: Rajesh on Feb 4, 2009 2:52 PM -
Problems with sender mail adapter
Hi XI Gurus
We have gone through a lot of blogs and searched a lot on the XI forum on how to configure the sender mail adapter with attachments but we still can't get it working at our site. Here are the issues -
1. When we define our data type in the IR as let's say out_email_dt with namespace "http://www.xyz.com" the mapping fails. In the monitor(SXMB_MONI) the message from the sender mail adapter comes in like this -
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
<xim:Mail xmlns:xim="http://sap.com/xi/XI/Mail/30" encoding="quoted-printable">
<Subject>test 10</Subject>
<From>"Test User" <[email protected]></From>
<To>"XI Test Account" <[email protected]></To>
<Content_Type>text/plain;charset="us-ascii"</Content_Type>
<Date>2007-05-08T05:34:38Z</Date>
<Message_ID><[email protected]></Message_ID>
<Content>This is the voice of the Mysterons=0A</Content>
</xim:Mail>
Question 1 - do we have to define our data type as "Mail" under the namespace "http://sap.com/xi/XI/Mail/30".
Question 2 - If you look at the content of the <From>,<To>,<Message_ID> tags you will see that there is content with <> tags which is causing the message mapping to fail. Is there a way of telling XI that they are not xml tags but part of some other tags?
2. Also the PayloadSwapBean doesn't seem to swap the payload to be the attachment.
3. Can we use masks in the PayloadSwapBean for attachment names like "." as we don't know what the file name is going to be as we have multiple partners who will be sending emails to the same address and with different file formats.
Thanks in advance.
SalilHi,
>>>>Question 1 - do we have to define our data type as "Mail" under the namespace "http://sap.com/xi/XI/Mail/30".
do exactly as shown in my blog:
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
>>>>2. Also the PayloadSwapBean doesn't seem to swap the payload to be the attachment.
do similarly as shown in my blog:
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
the everything will work
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Problem polling Inbox with Sender Mail adapter
Hi,
I have a funny problem with Sender Mail adapter (IMAP Protocol)
It was working fine previously.
Now, when I poll the Inbox, 2 things happen. After re-activation:
1. If there is a new mail in the Inbox, the Communication channel marks the mail as read, but still keeps reading the same mail into XI.
2. If there are no new mails in the Inbox, it reads the already read mails in the Inbox one by one. So all old mails start entering XI.
This problem exists only with the Inbox. It works fine with other folders for the same mail ID.
Any inputs as to why this is happening?
Regards,
Puloma.Hi,
We re-started the server and problem was solved. But we don't know why the Adapter Engine was behaving erratically.
Regards,
Puloma. -
Hi,
i send via E-Mail Adapter an XML File.
Is there a possibility to change the xml encoding.
from:
<?xml version="1.0" encoding="UTF-8" ?>
to
<?xml version="1.0" encoding="ISO-8859-1" ?>
regards,
robinhi
check the below links
XI: Sender mail adapter - PayloadSwapBean - Step by step
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
Mail Adapter (XI) - how to implement dynamic mail address
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
Note: reward points if solution found helpfull
Regards
Chandrakanth.k -
Encoding problems in email while on Windows Mail app
Hello.
I have a question concerning email and encoding problems in the Windows Mail App in Windows 8.1. I have encountered a problem with an email I received, while reading, I see strange ASCII characters in one email. I have never encountered it in
my web browsers nor Gmail, just the Mail App.
I was referred to come here when I had asked a similar question there:
http://answers.microsoft.com/en-us/windows/forum/windows8_1-ecoms/strange-foreign-ascii-characters-appearing-in/911f8a44-c302-4fa1-bcaa-3297b32d9120
I don't know which forum to go to so I picked here.
Is there any way that it can be resolved. I tried to troubleshoot, nothing worked; I even synched, to no avail.
I look forward to a response.
JBHi JB,
The responder on answers was a bit confused. The MSDN forums are for developers to discuss writing their own apps. We cannot help with problems using Windows or its built-in apps.
If the folks on answers cannot help then you may need to open a support incident. See
http://support.microsoft.com , or the folks on answers may be able to direct you to the specific page for the Windows Mail app.
--Rob -
Hi
I have done the mail adapter... in this, mail adapter is sender... i am testing my senarion in sxmb_moni in this i am getting the all read mials from my inbox i am not getting the unread mail... i want to pick only unread mail by sapxi and i have to place it into target direcory... i am getting the file into target directory but its not correct one... i have to get the file in target directory like this:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:File_Message_Type xmlns:ns0="http://mailtofiledemo.com/ravi">\
<row>
<name>Ravi</name>
<address>Vsp</address>
<material>Computer</material>
<units>3</units>
<price>90000</price>
</row>
</ns0:File_Message_Type>
but i am gettin only file like this:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:File_Message_Type xmlns:ns0="http://mailtofiledemo.com/ravi"></ns0:File_Message_Type>
Thanks & Regards
Ravi Shankar BHi Ravishankar,
When you are configuring the Sender mail adapter, try working around the 'Use mail package' function in the adapter settings..
Have a look at these..
http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
Hope it helps you!
cheers,
Prashanth -
Problem Mail-Adapter attachment with specified name
Hi,
We have the following scenario:
We have some EDIFACT-suppliers which we have to connect over Mail-adapter.
We have to fullfill several specifications by sending the mail.
So we have to create a specific filename for the EDI-attachment and the subject. Therefore I used the adapterspecific attribute THeaderSUBJECT, which we set in Mapping. This works fine.
Now the problem: We have to send only the payload-document as attachment of the mail with the same name as the subject of the mail. So we can't use the keep-attachment flag because then all attachments of this message would be sent in the mail.
How is it possible to send only the payload as attachment without any other documents and with specified filename in the attribute THeaderSUBJECT?
Has anybody an idea how to solve this problem?
Regards
ThorstenHi,
I have found a solution.
In a new module I copy the original paload to the payload of a new message object without attachments.
After calling this module I call the standard module MessageTransformBean to transform the payload into the attachment of the message.
Here the code of my module:
String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/Mail","THeaderSUBJECT");
// Generate new message object
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup(com.sap.aii.af.ra.ms.api.ConnectionFactory.JNDI_NAME);
MessageFactory factory = cf.createMessageFactory("XI");
Message msgnew = factory.createMessage(msg.getFromParty(),msg.getToParty(),msg.getFromService(),msg.getToService(), msg.getAction());
msgnew.setConversationId(msg.getConversationId());
msgnew.setDeliverySemantics(msg.getDeliverySemantics());
msgnew.setCorrelationId(msg.getMessageId());
msgnew.setMessageProperty("http://sap.com/xi/XI/System/Mail","THeaderSUBJECT",fileName);
String contentType = new String("text/plain;name="" + fileName + """);
// Copy original message to the new message
XMLPayload payload = (XMLPayload)(msg.getDocument());
payload.setContentType(contentType);
payload.setDescription("file");
payload.setName(fileName);
msgnew.setDocument(payload);
Now it works like it should work.
Regards
Thorsten -
Problem with mail adapter?
Hi All,
I developed MailAdapter and set all the initial parameters required to run the Adapter..it is working fine and i am even getting all the mails what i have in my mail box, but the problem is i could not able to read those mail messages..when i click on any one of the message, it is giving me anerror message saying that " Cannot open in desired mode "...this is the problem..i am unable to trouble shoot it...can any body help me...
Thanks in advance
regards
krishnaHi Michal,
I've tried your weblog
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
but in the adapter monitoring follow errors always appeares:
not intiliazed: failed to initialize the channel: com.sap.aii.messaging.util.URI$MalformedURIException: no scheme
Can you help me?
Thanks
Regards
Stefan
Maybe you are looking for
-
Can you have 2 itunes accounts on one pc using separate user accounts?
We've bought a new PC laptop and set up two user accounts for my husband and myself. I've installed itunes and downloaded my music in my account. In my husband's user account we can set him up but he can't download music for 90 days... we've set up a
-
Copy/extract audio from a DVD
Can someone help? I have never used GarageBand and would like to do something pretty basic. I have a DVD that I would like to extract parts of the audio and convert it to MP3. Is there a [easy] way to do this using GarageBand? I want to use the built
-
Itunes 10.5.1 Airplay not working
I have updated to 10.5.1, after the update Airplay stopped working. OS 10.7.2! Tried reseting the Airport Express, then re choosing the Airport Express from Multiple Speakers, accepts the check mark, never shows connecting to remote device. Double
-
"incompatible formats" when importing for SD DVD
I used FC to edit and used these settings for AV: Playback output VIDEO: Apple firewire NTSC 720 x 480 AUDIO: default [checked box] Different output for Edit to Tape/Print to Video VIDEO: HDV (1440 x 1080) 60i AUDIO: default Then I took it through Co
-
When will After Effects CS6 get a retina update?
I know there are people saying that After Effects works "fine" with retina, but they must not be as picky as me. After Effects is not at all fully compatible, at all. It's not even usable for me. The content viewer does not support retina resoluti