Author |
Message
|
mpong |
Posted: Wed Feb 10, 2016 5:43 am Post subject: exclamation mark in the Email Attachment |
|
|
Disciple
Joined: 22 Jan 2010 Posts: 164
|
Hi All,
I am reading the .xml file from the folder and sending it as an email attachment.
The input xml file encoding is UTF-8 and it does not have exclamation mark( !) in the file. When I see the email attached file contains ! as below on one of the tag randomly.
Please suggest what is going wrong here.
<Szordertyp!
e>
SET OutputLocalEnvironment.Destination.Email.Attachment[1].Content = ASBITSTREAM(InputBody CCSID 1208) ;
SET OutputLocalEnvironment.Destination.Email.Attachment[1].ContentType = 'text/xml';
SET OutputLocalEnvironment.Destination.Email.Attachment[1].ContentName = Environment.Variables.OriginalFileName; |
|
Back to top |
|
 |
timber |
Posted: Wed Feb 10, 2016 8:43 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
When I see the email attached file contains ! |
In which program do you 'see' this? Sometimes, problems like this are not defects in the message flow. They are caused by the application that is displaying the output. |
|
Back to top |
|
 |
mpong |
Posted: Wed Feb 10, 2016 11:19 pm Post subject: |
|
|
Disciple
Joined: 22 Jan 2010 Posts: 164
|
The file is not opening in IE and i could see the ! character in notepad ++ |
|
Back to top |
|
 |
maurito |
Posted: Wed Feb 10, 2016 11:31 pm Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
mpong wrote: |
The file is not opening in IE and i could see the ! character in notepad ++ |
Can you open the original file ? i.e. the one you are reading from the folder ? if so, what does it show ? |
|
Back to top |
|
 |
mpong |
Posted: Thu Feb 11, 2016 5:49 am Post subject: |
|
|
Disciple
Joined: 22 Jan 2010 Posts: 164
|
Thanks for the response.
Yes, I am able to open the original file in IE and other xml validation tools. whereas the email attachment is failed.
I do not see this character in the debugger as well. |
|
Back to top |
|
 |
mpong |
Posted: Thu Feb 11, 2016 7:40 am Post subject: |
|
|
Disciple
Joined: 22 Jan 2010 Posts: 164
|
When I put the message in the email body, It is coming correctly.
Where as in the email attachment I see the ! character and it is causing the file failure.
Input file xml declaration is
<?xml version="1.0" encoding="UTF-8"? |
|
Back to top |
|
 |
timber |
Posted: Thu Feb 11, 2016 8:14 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
What value have you put in LocalEnvironment.Destination.Email.Attachment.ContentEncoding ?
It would need to be 'base64' or 'Quoted-printable 'because according to the info center:
Quote: |
7bit is the default value that is used for ASCII text.
Base64 is used for non ASCII, whether non English or binary data. This format can be difficult to read.
Quoted-printable is an alternative to Base64, and is appropriate when most of the data is ASCII with some non-ASCII parts. This format is more readable; it provides a more compact encoding because the ASCII parts are not encoded. |
|
|
Back to top |
|
 |
mpong |
Posted: Thu Feb 11, 2016 11:05 pm Post subject: |
|
|
Disciple
Joined: 22 Jan 2010 Posts: 164
|
Thanks Timber!
I was using 7bit. It works well with the base64 |
|
Back to top |
|
 |
|