You will need to configure an email listener on the IS. The listener can invoke a service for each attachment or one for the entire email. The latter will allow you to parse the MIME yourself using the built-in services.
Thanks for the Immediate Reponse.I have created an email Listner on the IS.
Now how do i start ? from where ?? to parse the mail ??? ah ??
how do i use the getTransportInfo() ??? this is where i land in confusion…
plz bear with me … since i am totally beginner to WM.
Please Dont cross the posts…you have posted the same question in other thread too few days back and posted responses by us…
Anyways check these links,and make sure your email port settings are correct, and you have to extract the email body content(Stream).
[url=“wmusers.com”]wmusers.com
[url=“wmusers.com”]wmusers.com
Use debugging in the receiving flow service so first step would be getTransportInfo (no inputs needed)and nextstep is savepipelineToFile.Trigger an email via configured port and later use restorepipelineToFile and check the pipeline you should see the getTransportInfo/Email/content and all the other email headers like from,To,subject,contenttype etc…
So extract the content of the email body use these built-in services pub.io:streamTobytes,pub.string:bytesToString and further down follow upon your requirement.
"So extract the content of the email body use these built-in services pub.io:streamTobytes,pub.string:bytesToString and further down follow upon your requirement. "
After call getTransportInfo I call
pub.io:streamTobytes passing “transport/email/content” as input to this service. I get following exception in IS log - I am stuck and need urgent help - thanks!
java.lang.ClassCastException: java.lang.String at pub.io.streamToBytes(io.java:77) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:403) at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:630) at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46) at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:241) at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51) at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:228) at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30) at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:621) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:535) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:381) at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:237) at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:189) at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:324) at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:581) at com.wm.lang.flow.FlowState.step(FlowState.java:441) at com.wm.lang.flow.FlowState.invoke(FlowState.java:406) at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1040) at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:630) at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46) at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsPro
Can you kindly post the solution for this issue for extracting body of the message only in email? I am encountering the same error, in the contentStream variable, it says ‘java.io.ByteArrayInputStream’ as string instead of the stream object,
When trying to use StreamToBytes followed by BytesToString, I am encountering the class cast exception,
in pipeline of the email processing service, IS will give you either:
contentStream
or
ffdata
both are object type, you can use:
pub.mime:createMimeData
then in mimeData, you got:
mimeData/part/content
this content is Stream, use pub.io:streamToBytes to get the body of the email.
Its not inputstream. It’s contentStream. This must be placed in the service input variable stack.
The getTransportInfo doesn’t do anything it only says the input variables of the service it’s an info service not one for actual content retrieving.
To actually get something useful out of it one must pass it’s contents to MIME object from there you can extract body part, attachments, etc! This is achieved recurring to the get… functions on the WMPublic MIME folder read the manual (built in functions :)) for further instructions.
Connect (contentStream ↔ input [createMIMEData]).
Kaylan I’m complementing your info so that future readers get the problem solved quicker.
I’m working on a similar project and I tried the steps as per you suggested. When I try to extract the content of the email, I get much more extra junk characters along with the content. Is there a way to get exactly just the content of the email?
Check this:
To actually get something useful out of it one must pass it’s contents to MIME object from there you can extract body part, attachments, etc! This is achieved recurring to the get… functions on the WMPublic MIME folder read the manual (built in functions :)) for further instructions.
If you need further help I think I still have the package where I did this (have to check) I can email it to you.
I’m still trying to figure it out. If you don’t mind, please send me the package that you may have. It will be greatly helpful. My email address is: hpurandare@gmail.com
i am getting error as ,Failed to start EmailListener:pop3:xxxxxx@gmail.com:25: [ISS.0070.9003] Enable failed: Could not log into account xxxxx@gmail.com. while create new port on IS Admin.