I am able to poll my email client and invoke the corresponding service. But in that service, I don’t know how to retrieve the content, subject of email. Please let me know if any of you have gone through this in your implementation.
In the Service the body comes as an IData so get the cursor and read the payload.
If you want to check what is the content in the pipeline, call pub.flow.tracePipeline in your service.
* Go to Administrator webPage > Security > Ports > Add Port
* select webMethods/Email
* select default package to receive emails (or leave default WmRoot)
* enter email account info in Server Information section
* enter name of Default service eg: MyFolder:MyService
* email arrives in pipeline as object called "contentStream" so define an input object type for the service called "contentStream"
* use createMimeData to convert to IData object
pub.mime.createMimeData (map contentStream to input)
pub.mime.getBodyPartContent (part 0 = header, 1 = attachment)
streamToBytes
bytesToString
savePipelineToFile
etc...
I’ve tried the answer you’ve provided but the webMethods failed to get the email content.
Here is my pipeline result on the first step.
My email body only content “BODYtest 1 2 3”, however, the value has imported as an variable name instead of value.
I’m having exactly the same issue; the pipeline does not appear to have any data from the email (Subject, from, to, etc) except for the text in the body, which is presented as a variable name. This is right up at the top of the flow, so it’s before the call to createMimeData.
I have done this successfully. I can’t send you the flow itself, but I am happy to share the HTML of the flows for your review.
Send me an email and I’ll return a zip with the web pages you can view locally.
I use PSUtilities to store a config parameter with the names of the reports that I expect and categorize the mail by the subject line. Depending on the report, I extract either the body or an attachment.
I’m having a similar issue with the same. Could you please shed some light & share a detailed view of how to resolve the issue at sandeep.lati@gmail.com