Author |
Message
|
Vamsi Krishna |
Posted: Wed Sep 28, 2016 3:01 am Post subject: How to handle Email Input node and store the Email message |
|
|
 Acolyte
Joined: 12 May 2014 Posts: 53
|
Hi All,
I do have a requirement using the Email Input node need to encode the whole email message in Base64 format to the Destination.
As the Email Input node is showing the data in different parts. Email Input Header which contains To,From,CC address,Subject etc as one part and the message body in one part and attachment in another part. I am unable to figure out capturing the whole data as one blob and send to destination and destination should be capable of decoding and able to save it as ".msg" and able to open the email.
Could anyone put some light on how we can store the Email which received from Email Input. Appreciate your help. |
|
Back to top |
|
 |
timber |
Posted: Wed Sep 28, 2016 4:19 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
destination should be capable of decoding and able to save it as ".msg" and able to open the email. |
It sounds as if you are trying to create a single BLOB that represent a .msg file. Then you want to base64 encode that BLOB. Correct?
If my guess is correct, then you should supply some information about the .msg file format. Don't expect us to look it up. |
|
Back to top |
|
 |
Vamsi Krishna |
Posted: Wed Sep 28, 2016 7:44 pm Post subject: |
|
|
 Acolyte
Joined: 12 May 2014 Posts: 53
|
timber wrote: |
Quote: |
destination should be capable of decoding and able to save it as ".msg" and able to open the email. |
It sounds as if you are trying to create a single BLOB that represent a .msg file. Then you want to base64 encode that BLOB. Correct?
If my guess is correct, then you should supply some information about the .msg file format. Don't expect us to look it up. |
Hi Timber,
Yes iam trying to save it as single blob ".eml" worked for me. I am able to get everything the Header part Body but attachment gets printed in binary format at body when considering it as a single BLOB. I had used ASBITSTREAM function and converted InputRoot to single string and encoded to base64. Without attachment it is working perfectly only problem is with attachment. Trying to figure out this. Let me know if i can go with any other options. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Sep 29, 2016 5:51 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Perhaps you should review the CCSID your input blob is and the one you are passing to ASBITSTREAM. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
joebuckeye |
Posted: Thu Sep 29, 2016 6:13 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
How does this .eml format expect attachments to be sent to it?
Can the attachment be anything? Word doc, PDF, image? |
|
Back to top |
|
 |
Vamsi Krishna |
Posted: Thu Sep 29, 2016 10:07 am Post subject: |
|
|
 Acolyte
Joined: 12 May 2014 Posts: 53
|
joebuckeye wrote: |
How does this .eml format expect attachments to be sent to it?
Can the attachment be anything? Word doc, PDF, image? |
Hi Jeff,
I have used RootBitStream
Hi Joe,
That's the point were i stuck with attachment is PDF getting printed in the body part. Unable to figure out how to rebuild the structure and try to store it as whole email message. |
|
Back to top |
|
 |
timber |
Posted: Thu Sep 29, 2016 11:26 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
RootBitstream is not a CCSID. A CCSID is IBM's word for a character encoding ( e.g. UTF-8 ).
Quote: |
Yes iam trying to save it as single blob ".eml" worked for me. I am able to get everything the Header part Body but attachment gets printed in binary format at body when considering it as a single BLOB. I had used ASBITSTREAM function and converted InputRoot to single string and encoded to base64. Without attachment it is working perfectly only problem is with attachment. Trying to figure out this. Let me know if i can go with any other options. |
What do you mean by 'binary format'? That could mean about 5 different things. We cannot see your screen. Please take time to describe the problem carefully, with examples. |
|
Back to top |
|
 |
Vamsi Krishna |
Posted: Thu Sep 29, 2016 7:31 pm Post subject: |
|
|
 Acolyte
Joined: 12 May 2014 Posts: 53
|
timber wrote: |
RootBitstream is not a CCSID. A CCSID is IBM's word for a character encoding ( e.g. UTF-8 ).
Quote: |
Yes iam trying to save it as single blob ".eml" worked for me. I am able to get everything the Header part Body but attachment gets printed in binary format at body when considering it as a single BLOB. I had used ASBITSTREAM function and converted InputRoot to single string and encoded to base64. Without attachment it is working perfectly only problem is with attachment. Trying to figure out this. Let me know if i can go with any other options. |
What do you mean by 'binary format'? That could mean about 5 different things. We cannot see your screen. Please take time to describe the problem carefully, with examples. |
Hi Timber,
The pdf attachment is getting printed in the body part as below. My problem is how to differentiate the Email header,body and the attachment to make the output email to be displayed as Original email.
------=_NextPart_001_0073_01D21A50.A41F0D50--
------=_NextPart_000_0072_01D21A50.A41F0D50
Content-Type: application/pdf;name="invoicesample.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;filename="invoicesample.pdf"
%PDF-1.4
%âãÏÓ
1 0 obj
<</Type /Catalog
/Pages 2 0 R>>
endobj
2 0 obj
<</Type /Pages
/Kids [3 0 R]
/Count 1>>
endobj
9 0 obj
<</Length 10 0 R
/Filter /FlateDecode>>
stream
xœì½É®%M’ ¶Ï§È… ÌöyØRCC
¢ºA®©T± BV ì&Aèí ß` qÎÍŸÝúo•6dnnºð ŸÝ†ÏÌÒ÷Ö×úš¾—½Òõ'·\¾þÃß}IßÓõïëÊùûZ{}í»/³¯Õ¿üþüûy=¶T}Œ2ñ–U ªçõ}öë©Öú÷œ®úyåï³íþµ¥ïý®_RúÞ6ÈçÁ”¿§±êÛƒõ"÷1×ãÁº¯¯¦õö`kù{)k<¼š¾gz{0}ß}ì«ÍK=Ÿ«ÕgÓë ßëKÓËþÞ~ÑôûÁhú냧é÷ƒÑô×
OÓ ºé¯ ž&–yõèŸÓÄóà?ÕÄóà?ÕÄûÁ_6ñ· Fmí{*×::+ë_ú¸¾þBûyÓz]߯ƼÑò÷]°*ûøÞ (exö¤uz(?¾ÔÞßh?¯vìk ž´Ó²óö ÅmøñåïÕ¹‚ž^½ C- ;³¶¯y -²|¯µ/Y[æñ|oó{«ÏçÇ˾ú w£çXßGiãšäi/×b ½àÑû/¿üé
ÞüWý7ùëßýãU1Ïe`AóuþóÍÔû×Ë*‡ç_® (5}×$ítÍGû¾[¹zЮNçt
V» |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Sep 30, 2016 3:48 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What parser are you using to create a logical message tree from the data coming in? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vamsi Krishna |
Posted: Fri Sep 30, 2016 3:50 am Post subject: |
|
|
 Acolyte
Joined: 12 May 2014 Posts: 53
|
[quote="mqjeff"]What parser are you using to create a logical message tree from the data coming in?[/quote
I am using BLOB |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Sep 30, 2016 3:53 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The MIME parser is a much better choice. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vamsi Krishna |
Posted: Fri Sep 30, 2016 3:58 am Post subject: |
|
|
 Acolyte
Joined: 12 May 2014 Posts: 53
|
mqjeff wrote: |
The MIME parser is a much better choice. |
My requirement is need to convert whole email message in base64 format and place it in a xml |
|
Back to top |
|
 |
Vitor |
Posted: Fri Sep 30, 2016 4:30 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Vamsi Krishna wrote: |
mqjeff wrote: |
The MIME parser is a much better choice. |
My requirement is need to convert whole email message in base64 format and place it in a xml |
That still doesn't mean the MIME parser isn't a better choice to parse an inbound email message with attachments. Having parsed it, if you then elect to output it as a base64 encoded string in an email, so be it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vamsi Krishna |
Posted: Mon Oct 03, 2016 3:57 am Post subject: |
|
|
 Acolyte
Joined: 12 May 2014 Posts: 53
|
Vitor wrote: |
Vamsi Krishna wrote: |
mqjeff wrote: |
The MIME parser is a much better choice. |
My requirement is need to convert whole email message in base64 format and place it in a xml |
That still doesn't mean the MIME parser isn't a better choice to parse an inbound email message with attachments. Having parsed it, if you then elect to output it as a base64 encoded string in an email, so be it. |
Hi Vitor,
I have used MIME parser till and tried the conversion into single encoded string into XML field. But still the PDF file is getting printed in the body part. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Oct 03, 2016 4:03 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vamsi Krishna wrote: |
I have used MIME parser till and tried the conversion into single encoded string into XML field. But still the PDF file is getting printed in the body part. |
That sounds like your
doesn't work.
It's a shame we can't see it. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|