|
[VB.NET] | |
Function EnqueueTextDocument
(NotificationID As String, Number As String, Text As String)
As
String |
|
NotificationID |
Notification ID |
Number |
Target phone number |
Text |
Message Text |
|
Queue Item ID |
VB.NET
Example |
Switch to language:
[C#] |
|
| 'Create personalizer object and Session object |
| Dim pers As New PersonalizerRef.Personalizer()
|
| Dim sess As New SessionRef.Session()
|
| Dim SessionID As
String = "" |
| Try |
| SessionID = pers.CreateSession("LogonName", "Password") |
| 'Create Fax notification object |
| Dim objFax As New FaxRef.Fax()
|
| ' Create server notification object |
| Dim FaxNotifID As
String = sess.CreateFaxNotification(SessionID) |
| 'Put Text to fax in the queue and get queue item ID |
| Dim sQueueItemId As
String |
| sQueueItemId = objFax.EnqueueTextDocument(FaxNotifID, |
| "11005118196", "This is a simple fax notification text") |
| 'Retrieve Status of enqueued fax document |
| Dim oQueue As New QueueRef.Queue()
|
| Dim sQueueId As
String = sess.GetQueue(SessionID) |
| While oQueue.GetItemStatus(sQueueId, sQueueItemId) <>"Done" |
| '--- Do pause here or print some messages --- |
| End While |
| 'Print comments of transmitted document |
| Dim sComment As
String = oQueue.GetComments(sQueueId, sQueueItemId) |
| objFax.Release(FaxNotifID) |
| sess.Release(SessionID) |
| Catch e As Exception |
| 'Print exception message e.Message |
| sess.Release(SessionID) |
| End Try |