开发者

Sending Fax through c#

开发者 https://www.devze.com 2023-02-22 05:24 出处:网络
I am trying to develop an application which connects to our company\'s fax server and sends faxes. I am using FAXComLib for this.

I am trying to develop an application which connects to our company's fax server and sends faxes. I am using FAXComLib for this.

My code looks like this:

FAXCOMLib.FaxServer fs = new FAXCOMLib.FaxServer();
fs.Connect("<Remote Server Name>");            
object obj = fs.CreateDocument("FAXTEST.txt"); 
FaxDoc fd = (FaxDoc)obj;
fd.FaxNumber = "<number>";
fd.RecipientName = "<Reciepient>";
int i = fd.Send();
fs.Disconnect();

The problem is that I cannot connect to the remote server. The COM object throws an error hresult e_fail has been returned from a call to a COM component. This only happens when I am trying to con开发者_如何学JAVAnect to the remote server.

We are using a Multi Function Printer which has the Fax module installed on it. Can you help me figure out what could be going wrong here? or how can I debug this problem?


You should share your fax printer in windows server and add the fax printer in your client windows. So the application in the client could connect to the fax server in remote machine.


I just ended up using an external Fax API (http://www.interfax.net/en/dev). It was the most efficient and robust solution we could get in the time frame that we had.

0

精彩评论

暂无评论...
验证码 换一张
取 消