// SendFax.cs - FreeFax c# example
// Tim Ward, tward@avectra.com
// Avectra, Inc., http://www.avectra.com
// feel free to do whatever you wish with this code
using System;
namespace FaxClassLib
{
public class SendFaxApp
{
public SendFaxApp()
{
// constructor
}
public string SendFax(string szFrom, string szFaxNumber, string szTo, string szMessage)
{
// example params
// szFrom="tward@avectra.com";
// szFaxNumber="17035551212";
// szTo="OneOutBox Tech Support";
// szMessage="It's easy to send a fax from C#!";
string szReturnCode="";
// NOTES
// the next line creates an instance of the FreeFaxService proxy
// before you can do this, add a "Web Reference" to your asp.net project (specify url of wsdl)
// Visual Studio .NET then creates a proxy class which can be instantiated and manipulated in C#
com.oneoutbox.www.FreeFaxService oFax=new com.oneoutbox.www.FreeFaxService();
// send!
szReturnCode=oFax.SendFreeFAX(szFrom,szFaxNumber,szTo,szMessage);
// send back status code to caller
return szReturnCode;
}
}
}
© 2002 OneOutBox