| //Create personalizer object and Session object |
| PersonalizerRef.Personalizer pers = new PersonalizerRef.Personalizer()
; |
| SessionRef.Session sess = new SessionRef.Session()
; |
| string SessionID = ""; |
| try{ |
| SessionID = pers.CreateSession("LogonName", "Password"); |
| //Create Fax notification object |
| FaxRef.Fax objFax = new FaxRef.Fax()
; |
| // Create server notification object |
| string FaxNotifID = sess.CreateFaxNotification(SessionID); |
| //Send Text to fax syncronously |
| objFax.SendTextDocument(FaxNotifID, "11005118196", "This is a simple fax notification text"); |
| sess.Release(SessionID); |
| } |
| catch(Exception e){ |
| //Print exception message e.Message |
| sess.Release(SessionID); |
| } |