The QueueVCardSentEventArgs class prepares data for the
QueueVCardSent event.
Namespace: mCore
Assembly: mCoreLib (in mCoreLib.dll)
Inherits: System.EventArgs
| Property | Description | Type |
| DestinationNumber | Destination number to which the vCard message was sent | String |
| ErrorCode | Error code if vCard message sending failed | Long |
| ErrorDescription | Error description (corresponding to ErrorCode) if vCard message sending failed | String |
| MessageReference | Message reference number (comma separated numbers in case of concatenated or split message) of the SMS sent (this can be compared with MessageReference of NewDeliveryReportEventArgs if DeliveryReport property was set to true while submitting the message to queue) | String |
| QueueMessageKey | Unique key as string that identifies the message in the queue | String |
| SendResult | Message sending result as a boolean value (True if sending was successful) | Boolean |
| Visual Basic |
| Public Class MyClass Public WithEvents objSMS As New mCore.SMS Public Sub SendQueue() Dim objVCARD As mCore.vCard = objSMS.vCard Dim strKey As String Try SetCommParameters() objVCARD.Destination = "+919873094767" objVCARD.FirstName = "John" objVCARD.MiddleName = "" objVCARD.LastName = "Doe" objVCARD.Email = "john.doe@mycompany.com" objVCARD.URL = "http://www.johndoe.com" objVCARD.Company = "My Company" objVCARD.JobTitle = "Project Manager" objVCARD.HomePhone = "+911126457896" objVCARD.BusinessPhone = "+9123567852" objVCARD.MobilePhone = "+919865285263" objVCARD.HomeAddressStreet = "" objVCARD.HomeAddressCity = "New Delhi" objVCARD.HomeAddressState = "" objVCARD.HomeAddressCountry = "India" objVCARD.HomeAddressZIP = "" objVCARD.BusinessAddressStreet = "XYZ Street" objVCARD.BusinessAddressCity = "New Delhi" objVCARD.BusinessAddressState = "Delhi" objVCARD.BusinessAddressCountry = "India" objVCARD.BusinessAddressZIP = "110011" objVCARD.Comment = "Tax Consultant" strKey = objVCARD.SendToQueue(mCore.QueuePriority.High) MsgBox("vCard message added to queue." & vbCrLf & _ "[Queue Key: " & strKey & "]") objVCARD.Destination = "+919810098765" 'Following message is sent with normal queue priority strKey = objVCARD.SendToQueue() MsgBox("vCard message added to queue." & vbCrLf & _ "[Queue Key: " & strKey & "]") objVCARD.Destination = "+919811045678" strKey = objVCARD.SendToQueue(mCore.QueuePriority.Low) MsgBox("vCard message added to queue." & vbCrLf & _ "[Queue Key: " & strKey & "]") 'Message queue is enabled objSMS.Queue.Enabled = True 'Messages can be added to the queue even 'when the Message queue is enabled objVCARD.Destination = "+919873012345" strKey = objVCARD.SendToQueue(mCore.QueuePriority.High) MsgBox("vCard message added to queue." & vbCrLf & _ "[Queue Key: " & strKey & "]") Catch ex As mCore.GeneralException MsgBox(ex.Message, MsgBoxStyle.Critical, "mCore Demo") Catch ex As Exception End Try End Sub 'Event at the start of sending a queued vCard message Private Sub objSMS_QueueVCardSending(ByVal sender As Object, _ ByVal e As mCore.QueueVCardSendingEventArgs) _ Handles objSMS.QueueVCardSending MsgBox("Sending vCard message to: " & e.DestinationNumber & vbCrLf & _ "[Queue Key: " & e.QueueMessageKey & _ "]", MsgBoxStyle.Information, "SENDING VCARD") End Sub 'Event at the end of sending a queued vCard message Private Sub objSMS_QueueVCardSent(ByVal sender As Object, _ ByVal e As mCore.QueueVCardSentEventArgs) _ Handles objSMS.QueueVCardSent If e.ErrorCode > 0 Then MsgBox("vCard message sending FAILED to: " & e.DestinationNumber & _ vbCrLf & "[ERROR: " & e.ErrorDescription & _ "]" & vbCrLf & "[Queue Key: " & e.QueueMessageKey & _ "]", MsgBoxStyle.Critical, "VCARD FAILED") Else MsgBox("vCard message SENT to: " & e.DestinationNumber & vbCrLf & _ "[Queue Key: " & e.QueueMessageKey & _ "]", MsgBoxStyle.Information, "VCARD SENT") End If End Sub Public Sub SetCommParameters() Try objSMS.Port = "COM1" objSMS.BaudRate = mCore.BaudRate.BaudRate_19200 objSMS.DataBits = mCore.DataBits.Eight objSMS.StopBits = mCore.StopBits.One objSMS.Parity = mCore.Parity.None objSMS.FlowControl = mCore.FlowControl.RTS_CTS Catch ex As mCore.GeneralException MsgBox(ex.Message) Catch ex As Exception End Try End Function End Class |
| C# |
class MyClass { SetCommParameters(); catch
(mCore.GeneralException e) catch
(mCore.GeneralException e) |
mCore.SMS.QueueVCardSent Event
mCore.SMS.QueueVCardSentEventHandler Delegate