Chirag vm

hi to all
please help me for sending fax from my web application

i don't know any thing about that
so where to i start please help me
if any ode for that or required dll
sol please send me on my email address
chiragvm@hotmail.com

thanks for help in advance



Re: Visual C# General sendinf fax from web application


Re: Visual C# General sendinf fax from web application

Martin Xie - MSFT

Complete sample.
using System;
using FAXCOMLib;

namespace ConsoleApplication3
{

class Class1
{
public Class1()
{

}

public void FaxDocument(String faxFile, string faxnumber)
{
FAXCOMLib.FaxServer server = new FaxServerClass();
FAXCOMLib.FaxDoc doc = null;

int response = -11;

try
{
server.Connect(Environment.MachineName);
}
catch(Exception e)
{
System.Console.WriteLine("1"+e.Message);
}

try
{
doc = (FAXCOMLib.FaxDoc)server.CreateDocument(faxFile);
}
catch(Exception e)
{
System.Console.WriteLine("doc error"+e.Message);
}

try
{
doc.FaxNumber = faxnumber;
doc.RecipientName = "Test";
doc.DisplayName = "work";

}
catch(Exception e)
{
System.Console.WriteLine("assignments" + e.Message);
}

try
{
response = doc.Send();
}
catch(Exception e)
{
System.Console.WriteLine( response + e.Message);
}
try
{
server.Disconnect();
}
catch(Exception e)
{
System.Console.WriteLine("2"+e.Message);
}

System.Console.WriteLine("w00t");
}

[STAThread]
static void Main(string[] args)
{
Class1 objcsFax = new Class1();
objcsFax.FaxDocument("C:\\test.txt", "8067");
}
}
}

The compact code.

doc = (FAXCOMLib.FaxDoc)server.CreateDocument(faxFile);

doc.FaxNumber = faxnumber;

doc.SenderFax = "765765765";

doc.SenderName = senderName ;

doc.SenderAddress = "test";

doc.SenderCompany = "My Company";

doc.RecipientName = recipientName;

doc.DisplayName = displayName;

response = doc.Send();

return response.ToString();

server.Disconnect();

See these threads with some solutions for references.

How to send Fax Using C#

Send Fax