Problem retreiving email body

Hi,

(I also posted in Config & Admin).

I’ve setup a port to listen on my email server, which finally works. But, our client is about to send emails as plain text, in the body of the message. And there comes the hard part. I cannot find a way to retreive the body. I looked into the “pub.flow:getTransportInfo” service, which I call from the target service of the email-listener, but it only works when the content is send as an attachement.

When I save the pipeline (savePipelineToFile), it shows the following for the body data:

.

So it is inside the pipeline, but I don’t know how I can read it. I don’t feel much for writing a Java function which does some ugly parsing or something.

If anybody knows of a solution, please let me know.

Thanks in advance,

Patrick.

HI,
I’ve got this probleme too and the way i solve it is by working with a lot of string fonctions on the string of the pipefile…it’s not very academic but it can work: use the serchstring/replacestring/concatenate…
I’ve seen something about java programming but i dont arrive to make it work…

In my case i search the way of read the mail in the mime format in my pipline …it would be better!
I’ve post a message in this forum you can see if there’s any response…
Good luck

Did you figure out Nick?

I have the same problem. I want to retreive my message in a mime/smime format.

In WMSamples, it shows how to handle the message but not how to receiving it. Should we create a content handler? any sample one?

Thanks

Hello all,

me too I have the same problem, anybody had any luck soo far?

please let me know!

Claire

Check with tech support. There was an issue with IS 6.0 where emails without attachments were not forwarded to the receiving service.

Otherwise the email will be contained in an input object called “contentStream” on arrival at the receiving service. Use the pub.mime package to extract parts of the email using;

      pub.mime.createMimeData (map contentStream to input)
      pub.mime.getBodyPartContent (part 0 = header, 1 = attachment)
      streamToBytes
      bytesToString
      savePipelineToFile
      etc...

Cheers,
Allen.

hi can anyone help me to receive a mail and get the content of the mail.If the mail contains plain text.Please let me know the steps also

The B2B Integrator Guide (released with IS 4.0) describes how to receive documents via email. Its chapter 13, page 285+. Here is a link:

http://advantage.webmethods.com/bookshelf/B2B/B2B_V-4.0/B2BIntegratorUsersGuidev4.0.pdf

I am not sure where this information exists in the 6.0+ versions of the documentation, and have looked multiple times in the past. Either way, the functionality is the same.

Hope that helps…
Brian

Hi can anyone plz send me the snapshot of email port configuration.(urgent)
thanks in advance

junior WBuser
RANJITH

Thanks Brian
i got the following error while attempting to enable the port.
can u pls explain

Failed to start EmailListener:imap:ranjithsp@changepond.com@mail.navisite.com: [B2BSERV.0070.9001] Invalid global service retrieve

In the 6.1 documentation this info is located in XMLServiceDevGuide.pdf on Chapter 1 page 14 about sending/recieving XML via Email or SMPTP. Same guide has info on sewnding XML over HTTP or FTP as well.

But that is XML only if you must send other content the story is different and you may need to develop custom content handlers depending on content you try to get on any of these protocols.

I think this message:
Failed to start EmailListener:imap:ranjithsp@changepond.com@mail.navisite.com: [B2BSERV.0070.9001] Invalid global service retrieve

means that you have given some generic services to handle your e-mail porcessing and that service has wrong name or does not exists oin this server.

You can specify the global service name to handle all e-mails or have e-mail sender specify the services full name inside his e-mail subject to invoke it.

thanks to everyone replied my questions. Now i got the email body of using savePipelineTofile. But can any one pls tell me… how to read the content of the attached file. In the text file i can able to see the filename…Is there any spl flow service to read the content of the attached file. Or if any logic to read the content pls let me know.

Thanks in advance
ranjith

To receive a text file, you need to use the services located in the WmFlatFile package.