unable to send fax

  • Thread starter Thread starter Pavan Kumar
  • Start date Start date
P

Pavan Kumar

Hi All,
I had developed a application which sends fax using faxcom.dll in windows
2000 .Currently i had ported that application in 2003 server.I am unable to
send faxes .
The problem is that it is says operation timed out when i had called
objDoc.send() method in the below code.

//Getting all the messages from the Loop

foreach(PopMessage objMsg in objPop.Messages)

{

log.Debug("entered into the loop");

strMessage = objMsg.Message.Text.Trim();

Filename="\\Fax"+objMsg.Uid+".txt";

Filepath=ConfigurationSettings.AppSettings["Filepath"];

objSw = new StreamWriter(Filepath+Filename,false);

objSw.Write(strMessage);

objSw.Close();

strFaxnumber= getFaxNumber(objMsg.Message.Subject.ToString());

if(isnumeric(strFaxnumber))

{

FaxDoc objDoc = (FaxDoc)objFsc.CreateDocument(Filepath+Filename);

objDoc.FaxNumber = strFaxnumber;

objDoc.FileName=Filepath+Filename;

objDoc.SenderName=FaxSenderName;

log.Debug("Fax Number = " + strFaxnumber + " File Name = " +
Filepath+Filename + " Sender Name ="+ FaxSenderName);

objDoc.ConnectionObject=objFsc;

ShellExecute((int)objProcessHandler.Handle,"printto",Filepath+Filename
,"Fax",null,0);

objDoc.Send();

log.Debug("Fax sent");

}

else

{

log.Debug("Subject of the Email doesnot contain fax number "+
objMsg.Message.Subject.ToString());

}

any help is appreciated.

Regards

Pavan
 
I think this can be due to either of following reasons
1. You fax service is not started. You get time out error when fax is not
ready to accept connections
2. You are trying to connect to a remote shared fax service and faxcom.dll
is restricted to only local machine connections.

Also tell us what's the error code you are seeing exactly. One note about
your program - you can set any type of file to FaxDoc.FileName and it will
do the conversion to TIFF for you, provided there is a registered
application for that extension. So you need not call ShellExecute in a way.

HTH.

--
Raghavendra R
Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
 
Back
Top