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.
unfortuanatly we didn’t. We ent up by asking or customer whether they could send the text as an attachement but got no reply yet. The projects is also pushed forward a little…
I try to let you know when I do might find a good solution…
please let me know if you were able to get the body of the mail into the pipeline, I am having the same problem. Please mail me at rudi.jordaan@affinity.co.za.
Time interval = 0
port unspecified
logout after each check = yes
Global service : rfolder1:reciveAutoMail
Defualt Service : unspecified
is this correct guys ???
and in the IS
i have created a folder callled ycDebug
and a folder called rfolder1
and a flow service callled reciveAutoMail
and java service called retrive which is used in reciveAutoMail
and i have given many debug statements in retrive java file.
but it not workinggggggggggg can somebody guess why ??
i am sure that java is correct bcos i took it frm Devoloper Guide only…
The email listener will call your service rfolder1:reciveAutoMail
for each attachment in your email.
If the data is in the body and there are no attachments then you will have to
build a custom handler.
Other things to consider are to check if there are firewall issues getting
to the mail server from the IS server.
You say:
"i have created a folder callled ycDebug
and a folder called rfolder1
and a flow service callled reciveAutoMail "
… if this is the case, then the receive service you should configure is actually:
Global service : ycDebug.rfolder1:reciveAutoMail
Did you mean you created a package ‘ycDebug’ and a folder ‘rfolder1’?
You can copy/paste the service name from Developer to make sure the parameter in the email listener is 100% the same.
More hints:
Debug in java services can be tricky. System.err.println(…) will dump the output to stdout, and if you’re after something quick and dirty then this is often good enough for prototyping.
Try invoking a flow service instead where you can savePipelineToFile. This will remove some of the troubleshooting complexities from your scenario involving an invoked java service.
You can enable enhanced logging on the Integration Server where you are configuring this email listener (and thereby remove the need to ‘guess’ what the problem is) by using the HTML administration console Settings > Logging; move the log level to 8 or 10 and enable the following facility: 0068 Email Listener. This will log more detail to the Server log.
The Error log may already have information on the problem.
NOTE: Remember to re-enable all facilities when you’re finished since this filtering affects the entries written to the server log - it’s quite common to think the server isn’t started simply because someone has changed the logging levels so you don’t see the ‘Initialization completed’ message.
Did you change the “Access Mode” on the Ports screen to “Allow by default” for your email listener and test it then? Are your emails disappearing from your inbox? [ie. is the port logging in, getting the emails but not running your service].
Do the logs on your email server show the IS logging in?
Based on the above information we could conclude that I am able to connect the Server. It looks only my service is not invoking.
Here “Subject: smtp:receiveFiles”- smtp.receiveFiles is the service name which I provided in the Global Service.