Sub btnsend_MouseClicked (EventData As MouseEvent)
If txtfrom <> "" Then
txtmsg = txtfrom & "," & txtmsg
Else
Log("email address is empty, plese enter email address")
Return
End If
Dim msgbytes() As Byte
Dim hexstring As String
msgbytes = txtmsg.GetBytes("UTF8")
hexstring = hex.HexFromBytes(msgbytes)
Log("https://core.rock7.com/API2/SendRawMessage/" & deviceSerialNumber)
job1.PostMultipart("https://core.rock7.com/API2/SendRawMessage/" & deviceSerialNumber & "/", CreateMap("username": "xxxxxxx", "password": "yyyyy", "data": hexstring),Null)
End Sub