/**//// <summary>
/// ////发送传真的方法,传递三个参数
/// </summary>
/// <param name="faxFile"></param>
/// <param name="faxNumber"></param>
/// <param name="hostName"></param>
public void sendFax(string faxFile ,string faxNumber,string hostName)
{
//writeFile("sendFax faxFile= "+faxFile);
string sql = "";
string faxID = "";
FileInfo f = new FileInfo(faxFile);
if(f.Exists)
{
//FAXCOMLib.FaxServer faxsvr = null;
FAXCOMLib.FaxDoc faxdoc = null;
try
{
faxsvr = new FAXCOMLib.FaxServer();
faxdoc = (FAXCOMLib.FaxDoc)faxsvr.CreateDocument(f.FullName);
}
catch(Exception ex)
{
errorMessage = ex.Message;
writeFile("create fax server error! " + errorMessage);//Environment.MachineName
}
try
{
faxsvr.Connect(hostName); // or specify the computer name Environment.MachineName
}
catch (Exception ex )
{
errorMessage = ex.Message;
writeFile("link host "+hostName+ " error! " + errorMessage);
}
//
//