通过.NET / C#发送传真传真、NET

2023-09-06 13:13:10 作者:簡簡單單ゞ

我该如何去有关.NET中发送传真?我们通过它,我们需要传真的文件给客户的传真服务器。因为我们有一个传真服务器,我无法想象我有我的机器上配置传真调制解调器,对不对?它只会通过传真服务器?

How do I go about sending fax in .NET? We have a fax server through which we need to fax documents to clients. Since we have a fax server, I don't imagine that I have to configure a fax modem on my machine, right? It would just go through the fax server?

有什么好看的免费(或廉价)传真的API了吗?在我的研究,我已经遇到FAXCOMEXLib,FaxMan和Windows传真服务,但文档似乎有限,所以我希望这里有人能在正确的方向指向我。

Are there any good free (or cheap) Fax APIs out there? IN my research I've come across FAXCOMEXLib, FaxMan, and Windows Fax Service, but the documentation seems limited, so I am hoping someone here can point me in the right direction.

谢谢!

推荐答案

据我所知,.NET并没有任何内置的直接支持通过传真服务器发送传真。缺席的是,你可能要使用的COM接口传真服务器。基本上,你创建一个FaxServer对象,并调用它的连接方法连接到传真服务器。然后调用FaxServer的CreateDoc方法来创建传真文档对象。该FaxDoc对象有一个(巨大)的数量属性来指定更多有关收件人和文档比任何理智的人会想象,但两个主要的文件名和FaxNumber。一旦你设置这些(以及任何你想要的其他人),你调用它的发送方法的文档发送至传真号码。

As far as I know, .NET doesn't have anything built in to directly support sending faxes via a fax server. Absent that, you'd probably want to use the COM interface to the fax server. Basically, you create a FaxServer object and invoke its Connect method to connect to the fax server. You then invoke the FaxServer's CreateDoc method to create a fax document object. The FaxDoc object has a (huge) number of properties to specify more about the recipient and document than any sane person would imagine, but the two main ones are the FileName and FaxNumber. Once you've set those (along with any others you want) you invoke its Send method to send that document to that fax number.

我上次用这个几年前玩过,所以我可能会跳过一些事情。主要是我记得它似乎奇怪的是,FaxServer创建您在填补一个空白FaxDoc,然后要求发送一样,这有一个的很多的文件覆盖东西,最初看起来像它会是必要的,但竟然是完全不相干的,至少对我所做的一切(和现在回想起来,可能通常会)。

I last played with this a few years ago, so I'm probably skipping a few things. Mostly I remember that it seemed strange that the FaxServer created a blank FaxDoc that you filled in and then asked to send itself, and that there was a lot of documentation covering "stuff" that initially seemed like it would be necessary, but turned out to be completely irrelevant, at least for what I was doing (and in retrospect, probably usually would be).