Help sending email via TN

Receiving the following error from TN:
Task h4cdas00uhutjeel0000004k failed with no more retries available. Reason for failure - Delivery service for h4cdas00uhutjeel0000004k failed with a status of fail and status message of com.wm.app.b2b.server.ServiceException: javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: IOException while sending message;
nested exception is:
java.io.IOException: “text/xml” DataContentHandler requires String object, was given object of type class [B

I am calling wm.tn:submit after createNewEnvelope using the appropriate Doc and Sender/Receiver Ids. And addContentPart with partName ‘xmldata’. I generate the bytes for the contentpart by using pub.string:stringToBytes with encoding set to ‘UTF-8’ TN is using the processing rule set to deliver to receiver via PrimarySMTP, but gives the above error on the delivery.

Where am I going wrong? Help!

Forgot to mention that I am running IS v6

Rob,

I’m having the same problem. Did you find a solution?

Thanks,
Percio

Rob,

I’m having the same problem. Did you find a solution?

Thanks,
Percio

Percio,

Can you elaborate on your process and error you are seeing,so that it will be easy for everyone to respond and resolve.

Regards,

percio,

How are you submitting the xml to TN?is it via external http post(setting content-type:text/xml)or ISAdminPage/WmTNWeb using document submission or from a flowservice tn.receive or routeXML service sending as a node object?

Looks like the TN is not receiving the data with content-type “text/xml” ,so delivery is failing.

HTH,
RMg

RMG,

I am actually using an HTML page with a form that contains a text area called $xmldata. The form submits the text area data to the URL of a service that is very similar to wm.tn:receive. This page works for every other XML document we post to TN, so I don’t think this is the problem.

However, I went ahead and tried using the WmTNWeb Document Submission tool and I also tried executing pub.client:http with url=http://server:post/wm.tn/receive, method=post, loadAs=bytes, data/string=the XML message, and headers=[Content-Type=text/xml]. Both resulted in the same error.

By the way, I’m running IS 6.0.1 with TN 6.0.1 Build 550 and these are the current updates on the IS:
IS_6-0-1_SP2
IS_6-0-1_Fix87
IS_6-0-1_SP1_Fix43
TNS_6-0-1_Fix8
IS_6-0-1_SP1_Fix143

Thanks,
Percio

Hello,
I saw in the original post the [B. That means that you had a byte array. You can use the pub.string.bytesToString service. Then take the string (if it is XML) to your other input. Or you may be able to use the pub.io.bytesToStream service and do something similar. Good day.

Yemi,

Thanks for the reply. However, my goal here is to avoid having to develop a new service. All I really need is for the document to be e-mailed to the receiver based on the Primary E-mail on their profile, and if at all possible, I’d like to accomplish that via TN only.

Thanks,
Percio

Hello,
I see you want something different.
In TN, you will setup a processing rule for this customer and document. You will on the “action” tab select the “deliver document by” check box and also pick the either the “receiver’s preferred protocol” radio button if this will be shared between multiple TP and they use different protocols or you will pick “immediate delivery” and pick “primary e-mail” from the drop down menu.
If you use the former, make sure that the profile for each partner on the “delivery method” tab has the protocol needed for transport", the e-mail address filled in and the check box just below saying “use as preferred protocol” is selected for ONLY that protocol.

That should be fine for you. You should use this throughout your flow services that call send message flows and use different protocol. Use the “preferred protocol”. Good day.

Yemi,

That’s exactly what I’m doing currently and that’s how I’m getting the error.

Thanks anyway,
Percio

Percio,

Please look in the Advantage site and see if there is any fix released for this issue.Since you have tested all the possible ways mentioned above.

I will let you know if there anything missing in the process.

HTH,
RMG

Rob Ham/Percio Castro/Others:

I am receiving a very similar error in my IS flow service when I try to pass a filename (fully qualified) to the pub.client:smtp service’s attachment doclist. Here it is …

[javax.mail.MessagingException: IOException while sending message;
nested exception is:
java.io.IOException: “text/plain” DataContentHandler requires String object, was given object of type class java.io.FileInputStream]

Could you please let me know how if you were able to resolve your respective issues, if so how?

Thanks in advance!

In the filename you dont need to give fully qualified path name,any file name with .txt or .dat would be fine.

Also are you specifying Attachments/content-type=text/plain and passing bytes or string object?

HTH,
RMG