I am trying to use a custom covertsheet for the sample fax which I am trying to send. I have prepared the word document by modifying an existing cover sheet which I have downloaded from https://test2.fax2mail.easylink.com/. Below is the code which I am using:
#region Setup Covert page details
JobSubmit.FaxCoversheetOptionType CoverSheet = new JobSubmit.FaxCoversheetOptionType();
CoverSheet.UseCoversheet = JobSubmit.YesNo.yes;
if(JobSubmit.YesNo.yes == CoverSheet.UseCoversheet)
{
//use the details in here
CoverSheet.CoversheetName = "cs_temp_02";
}
#endregion
#region Setup the inserts to the coverpage
JobSubmit.InsertListTypeInsert[] inserts = null;
if (JobSubmit.YesNo.yes == CoverSheet.UseCoversheet)
{
inserts = new JobSubmit.InsertListTypeInsert[9];
inserts[0] = new JobSubmit.InsertListTypeInsert();
inserts[0].number = "1";
inserts[0].Value = "To Santa";
inserts[1] = new JobSubmit.InsertListTypeInsert();
inserts[1].number = "2";
inserts[1].Value = "North Pole Toy Factory";
inserts[2] = new JobSubmit.InsertListTypeInsert();
inserts[2].number = "3";
inserts[2].Value = "18568809090";
inserts[3] = new JobSubmit.InsertListTypeInsert();
inserts[3].number = "4";
inserts[3].Value = "1-800-SANTA";
inserts[4] = new JobSubmit.InsertListTypeInsert();
inserts[4].number = "5";
inserts[4].Value = "Children Foundation";
inserts[5] = new JobSubmit.InsertListTypeInsert();
inserts[5].number = "6";
inserts[5].Value = "18568809091";
inserts[6] = new JobSubmit.InsertListTypeInsert();
inserts[6].number = "7";
inserts[6].Value = "1-800-ANGELS";
inserts[7] = new JobSubmit.InsertListTypeInsert();
inserts[7].number = "8";
inserts[7].Value = "child@angels.com";
inserts[8] = new JobSubmit.InsertListTypeInsert();
inserts[8].number = "9";
inserts[8].Value = "Give me lots of presents this christmas.";
}
#endregion
#region Setup the destination details
JobSubmit.FaxType[] delivery = new JobSubmit.FaxType[1];
delivery[0] = new JobSubmit.FaxType();
delivery[0].Phone = ToFaxNumNode.InnerText;
JS_Message[0].Destinations = delivery;
if (null != inserts)
{
delivery[0].InsertList = inserts;
}
#endregion