Nothing jumping out at me. What exactly is the problem you are having?
Verify that the JobSubmit WSDL is your web reference.
Tom
This is the exception I am getting:
Client found response content type of 'text/html;charset=UTF-8', but expected 'text/xml'.The request failed with the error message:--
You are using the base email. It only accepts text files. You need to use the Enhanced Email. Change this line in your code.
EasyLinkJobSub_ws.EmailOptionsType JS_EmailOptions = new EasyLinkJobSub_ws.EmailOptionsType();to
EasyLinkJobSub_ws.EnhancedEmailOptionsType JS_EmailOptions = new EasyLinkJobSub_ws.EnhancedEmailOptionsType();Tom
I am still getting the same error:
Client found response content type of 'text/html;charset=UTF-8', but expected 'text/xml'.The request failed with the error message:
How does the system know what e-mail to send to. Im not specifying that in my program?
--
Please help. Thanks
I am just trying to e-mail 1 person right now then I can change program later to include multiple. Can somebody just help me do 1 e-mail that works please? Thank you
First, not specifying a Destination will cause an error in itself.
What URL are you submitting too?
Please attach the Result file that is outputted by the serializeResult function. If you do not have that function in your code it can be found in the Helper Functions sample at:
https://apiforums.easylink.com/content/c-sample-helper-functions
the url is
EM.Url =
"https://test2.fax2mail.easylink.com/welcome.do";
There is no serializeResult function in this link https://apiforums.easylink.com/content/c-sample-helper-functions so I have it commneted out in my program.
You're trying to use the portal login URL to submit an API request. That definitely won't work.
The correct URL to use is https://test2messaging.easylink.com/soap/sync.
Give that a try...
The Helper Functions sample has been updated with the serializeResult function if you want to use it.
Now im getting
Error in parsing
The previous e-mail has all the code
The email code is missing the destination. Like you have it in the fax code but with InternetType.
All of the New's in the fax code are missing the web reference. I see it is commented out though.
It would help kif you serialize the request also, then you can see what is actually being submitted.
Support - in case the issue is the user ID, we provided a new myportal / XDDS / MR ID of T2/NCSSUITE, but the same parser error is being recieved.
<JobSubmitResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Status xmlns="http://ws.easylink.com/JobSubmit/2011/01"><StatusCode>0</StatusCode><SubmissionTime>2012-05-09T14:23:57.743Z</SubmissionTime><CompletionTime>2012-05-09T14:23:58.061Z</CompletionTime></Status><MessageResult xmlns="http://ws.easylink.com/JobSubmit/2011/01"><MessageId>JMP2-LAPTOP5/9/2012 10:21:50 AM</MessageId><Status><StatusCode>1</StatusCode><StatusMessage>XOA-2000 [system error] : Couldn't find list with name YzpcdGVtcFxTZW5kVG8udHh0 (#c:\temp\SendTo.txt)</StatusMessage><SubmissionTime>2012-05-09T14:23:57.982Z</SubmissionTime><CompletionTime>2012-05-09T14:23:58.061Z</CompletionTime></Status></MessageResult></JobSubmitResult>
Getting XOA-2000 [system error] : Couldn't find list with name but the file is there.
The destination file has to be a CSV file. Field names on the first line. Every other line is for each recipient. See the attached sample.
Did you get it to work with a single address based on what you had in the fax code, except changing the type to InternetType?
I changed to csv and I am still getting the same error.
Please attach your code again. Are you stepping through the code in debug mode to make sure the file is being picked up? Are you encoding the csv file?
The sample code shows using a csv file.
https://apiforums.easylink.com/content/c-sample-jobsubmit-enhancedemail
Here is the code
The CSV file is not a ListType, it is a document. Then you need to specify it as a TableType and reference the name in there. Then you need to add it to the Message.Destinations. This is all shown in the sample code at the URL I posted above. I am pasting it here too.
// Setup Document 3 - CSV List DocData = new EMsgAPI_Demo.EMsgAPI_JobSubmit201101.DocDataType(); File = ReadAndEncodedFile(txtCSVList.Text, true); DocData.format = EMsgAPI_Demo.EMsgAPI_JobSubmit201101.DocEncodingFormat.base64; DocData.Value = File;
JS_Documents[2].Item = DocData; myFileName.Value = "CSVList.csv"; JS_Documents[2].Filename = myFileName; JS_Documents[2].DocType = "text"; JS_Documents[2].ItemElementName = EMsgAPI_Demo.EMsgAPI_JobSubmit201101.ItemChoiceType.DocData; JS_Documents[2].@ref = "CSVList1"; DocData = null;
// Setup Content Object (documents are referenced here) // Setup table for list EMsgAPI_Demo.EMsgAPI_JobSubmit201101.TableType[] CSVList_Table = new EMsgAPI_Demo.EMsgAPI_JobSubmit201101.TableType[1]; CSVList_Table[0] = new EMsgAPI_Demo.EMsgAPI_JobSubmit201101.TableType(); CSVList_Table[0].Item = "CSVList1"; CSVList_Table[0].@ref = "CSVList_Table1";
JS_Message[0].Contents = EM_Content; JS_Message[0].Destinations = CSVList_Table;
ok I think it went through because I get the following
but I dont see any e-mails sent in my account and I didnt receive an e-mail. Whats wrong?
<?xml version="1.0" encoding="UTF-8"?>-<JobSubmitResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -<Status xmlns="http://ws.easylink.com/JobSubmit/2011/01"> <StatusCode>0</StatusCode> <SubmissionTime>2012-05-09T18:42:21.384Z</SubmissionTime> <CompletionTime>2012-05-09T18:42:22.02Z</CompletionTime> </Status> -<MessageResult xmlns="http://ws.easylink.com/JobSubmit/2011/01"> <MessageId>JMP2-LAPTOP5/9/2012 2:40:14 PM</MessageId> -<Status> <StatusCode>0</StatusCode> <StatusMessage>OK</StatusMessage> <SubmissionTime>2012-05-09T18:42:21.685Z</SubmissionTime> <CompletionTime>2012-05-09T18:42:22.019Z</CompletionTime> </Status> -<JobId> <XDN>flusme</XDN> <MRN>889247</MRN> </JobId> </MessageResult> </JobSubmitResult>
Any help for last post? Thanks you
We are looking at it. It was received, but there was an error. More shortly.
In your BODYmessage document you are specifying that it is HTML but then passing in plain text. This causes an error. If you specify HTML then it has to be HTML. You can change it to be TEXT for testing. The best is to do the same as the sample code, pass in a HTML body and a text body. That is what most email is now.
OK I changed the program to look exactly the same as the sample for the bodymessage and it looks like it goes through I get no errors. But I still do not see anything in my outbox and I dont receive any e-mails. This is the result.xml
<?xml version="1.0" encoding="UTF-8"?>-<JobSubmitResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -<Status xmlns="http://ws.easylink.com/JobSubmit/2011/01"> <StatusCode>0</StatusCode> <SubmissionTime>2012-05-10T13:39:20.982Z</SubmissionTime> <CompletionTime>2012-05-10T13:39:21.593Z</CompletionTime> </Status> -<MessageResult xmlns="http://ws.easylink.com/JobSubmit/2011/01"> <MessageId>JMP2-LAPTOP5/10/2012 9:37:19 AM</MessageId> -<Status> <StatusCode>0</StatusCode> <StatusMessage>OK</StatusMessage> <SubmissionTime>2012-05-10T13:39:21.238Z</SubmissionTime> <CompletionTime>2012-05-10T13:39:21.592Z</CompletionTime> </Status> -<JobId> <XDN>flusme</XDN> <MRN>921829</MRN> </JobId> </MessageResult> </JobSubmitResult>
Here is the sourcecode if u need it for last post.
You need to remove the following:
myFileName.Value = "c:\\temp\\Body.txt"; JS_Documents[0].Filename = myFileName;That is overriding the DocData which you created right before. You would only use the above when you are passing a plain text file that has not been encoded.
Now I get "device not ready". What does this mean?
"device not ready" doesn't mean anything to me - are you seeing that as an error message from your program when you try to submit, or is it coming back in an XML result message?
It happens on this line
JS_Result = EM.JobSubmit(JS_Request);