/**//// <summary>
try
{
faxdoc.filename =f.fullname;
faxdoc.recipienttitle = "recipienttitle";
faxid = f.name;//system.datetime.now.tostring();/
//faxdoc.recipientzip = faxid;
//writefile("sendfax faxfile= "+faxfile + "; f.fullname=" + faxdoc.filename);
// //-----------------------------------------------------////////
faxdoc.recipientaddress = "recipientaddress";
faxdoc.recipientcompany = "recipientcompany";
faxdoc.recipientcountry = "recipientcountry";
faxdoc.recipientdepartment = "recipientdepartment";
faxdoc.recipienthomephone = "recipienthomephone";
faxdoc.recipientname = faxid;/**/////////////传真id号
faxdoc.recipientoffice = "recipientoffice";
faxdoc.recipientofficephone = "recipientofficephone";
//faxdoc.sendcoverpage = 0;
faxdoc.senderaddress = "senderaddress";
faxdoc.sendercompany = "sendercompany";
faxdoc.senderdepartment = "senderdepartment";
faxdoc.senderfax = "senderfax";
faxdoc.senderhomephone = "senderhomephone";
faxdoc.senderofficephone = "senderofficephone";
faxdoc.sendertitle = "sendertitle";
//faxdoc.servercoverpage = 1;
faxdoc.coverpagename = "coverpagename";
faxdoc.coverpagenote = "coverpagenote";
faxdoc.coverpagesubject = "coverpagesubject";
// //------------------------------------------------------//////////
faxdoc.faxnumber =faxnumber;// specify the fax number;
//writefile("f.fullname= "+f.fullname + "; faxdoc.filename=" + faxdoc.filename);
intsend = faxdoc.send();
writefile("faxdoc.tsid= " + faxdoc.sendcoverpage + "; gethashcode" + faxdoc.gethashcode() + "; filename:" + faxdoc.filename );
//system.threading.thread.sleep(2000);
//faxsvr.disconnect();
writefile("send successfully["+intsend+"] " + f.fullname + " " +"(faxnumber: " +faxnumber +";hostname: " +hostname+ ")");
sign = 1;
}
catch ( exception ex )
{
errormessage = ex.message;
writefile("send error["+intsend+"] " +f.fullname+" "+errormessage + "(faxnumber: " +faxnumber +";hostname: " +hostname+")");
sign =0;
//system.threading.thread.sleep(5000);
}
}
else
{
sign =0;
errormessage = "error:"+faxfile +" not exist !";
writefile(errormessage);
}
if( sign ==0)
{
sql = "update job_log set result_message = 'error:"+errormessage.replace("'","''")+"',log_title='"+faxid+"' " ;
sql += " where sql like '%"+f.name +"' and event_type ='fax'";
sqlupdate(sql);
}
else if (sign ==1)
{
sql = "update job_log set result_message = 'successfully',log_title ='"+faxid+"'" ;
sql += " where sql like '%"+f.name +"' and event_type ='fax'";
sqlupdate(sql);
}
}
新闻热点
疑难解答