Beispiel #1
0
 public void SendFax()
 {
     try
     {
         FaxDocumentSetup();
         object submitReturnValue = faxDoc.Submit(faxServer.ServerName);
         faxDoc = null;
     }
     catch (System.Runtime.InteropServices.COMException comException)
     {
         Console.WriteLine("Error connecting to fax server. Error Message: " + comException.Message);
         Console.WriteLine("StackTrace: " + comException.StackTrace);
     }
 }
Beispiel #2
0
 public void SendFax()
 {
     try
     {
         FaxDocumentSetup("Tuan", "THCOMPANY", txt_file.Text, "Send Test Fax from Windows", "Test file", txt_faxnum.Text);
         object submitReturnValue = faxDoc.Submit(faxServer.ServerName);
         faxDoc        = null;
         rtd_log.Text += "Activity:   " + faxServer.Activity + Environment.NewLine + "Configuration:   " + faxServer.Configuration + Environment.NewLine
                         + "CurrentAccount:   " + faxServer.CurrentAccount + Environment.NewLine
                         + "FaxAccountSet:   " + faxServer.FaxAccountSet + Environment.NewLine
                         + "GetDeviceProviders:   " + faxServer.GetDeviceProviders().Count + Environment.NewLine
                         + "GetDevices:   " + faxServer.GetDevices().Count + Environment.NewLine
                         + "LoggingOptions.ActivityLogging:   " + faxServer.LoggingOptions.ActivityLogging + Environment.NewLine
                         + "LoggingOptions.ActivityLogging:   " + faxServer.ServerName + Environment.NewLine
                         + faxServer.Activity.IncomingMessages.ToString()
                         + " \n" + faxServer.Activity.OutgoingMessages.ToString()
                         + " \n" + faxServer.Activity.QueuedMessages.ToString()
                         + " \n" + faxServer.Activity.RoutingMessages.ToString();
     }
     catch (Exception comException)
     {
         MessageBox.Show("Data: " + comException.Data + "\n" + "HelpLink: " + comException.HelpLink + "\n" + "HResult: " + comException.HResult + "\n" + "InnerException: " + comException.InnerException + "\n" + "Message: " + comException.Message + "\n" + "Source: " + comException.Source + "\n" + "StackTrace: " + comException.StackTrace + "\n" + "TargetSite: " + comException.TargetSite);
     }
 }