1

如果我将值插入到 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 自动发送传真,那么我需要填写哪些表格才能做到这一点?

谢谢

4

1 回答 1

1

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

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

如果您遇到任何问题,很乐意提供帮助...

于 2013-02-14T21:28:01.757 回答