RightFax 10.0与C#集成

时间:2012-06-14 18:59:57

标签: rightfax

如果我将值插入到RightFax的相应表中,是自动传真还是我需要为此编写以下代码?

RFCOMAPILib.FaxServerClass faxserver = new RFCOMAPILib.FaxServerClass(); 
faxserver.ServerName = "ServerName"; 
faxserver.Protocol = RFCOMAPILib.CommunicationProtocolType.cpNamedPipes; 
faxserver.UseNTAuthentication = RFCOMAPILib.BoolType.True; 
faxserver.OpenServer(); 

RFCOMAPILib.Fax fax = (RFCOMAPILib.Fax) faxserver.get_CreateObject(RFCOMAPILib.CreateObjectType.coFax); 

// set up your 'fax' object the way you want it, below is just some sample options 
fax.ToName = "John Doe"; 
fax.ToFaxNumber = "4255551111"; 
fax.ToVoiceNumber = "4255550000"; 
fax.ToCompany = "ACME"; 
fax.FromName = "My Company"; 
fax.FromVoiceNumber = "4255552222"; 

fax.Send(); 

您能否提供附件的示例代码?如果RightFax自动发送传真,那么我需要填写哪些表才能这样做?

由于

1 个答案:

答案 0 :(得分:1)

以下代码是vb.net,但会向您展示如何发送传真和添加附件,希望这会有所帮助。我写了一篇关于这个here的帖子,但这里是下面的代码....

Dim FaxAPI As RFCOMAPILib.FaxServer
Dim fFax As RFCOMAPILib.Fax
FaxAPI = New RFCOMAPILib.FaxServer
FaxAPI.ServerName =something
FaxAPI.Protocol = RFCOMAPILib.CommunicationProtocolType.cpTCPIP
FaxAPI.UseNTAuthentication = RFCOMAPILib.BoolType.False
FaxAPI.AuthorizationUserID = something
FaxAPI.AuthorizationUserPassword = something
FaxAPI.OpenServer()
fFax = FaxAPI.CreateObject(RFCOMAPILib.CreateObjectType.coFax)
fFax.Attachments.Add(“D:\FilePickupIn\2222222222-20110322142718-01.tif”)
fFax.HasCoversheet = RFCOMAPILib.BoolType.False
fFax.ToFaxNumber = something
fFax.ToName = something
fFax.Send()
FaxAPI.CloseServer()
FaxAPI = Nothing
fFax = Nothing
如果你遇到任何问题,

很乐意提供帮助......