Hi All,
have developed a simple webapp sendmail (another B4JHOWTO using jQuery Mobile).
The mail is sent using SMTP. This works all fine, but after the mail is sent a selector ("lblfooter" as defined in the index.html) is not updated in the html file.
If clicking on a dialog, like about button, the selector is updated.
The same happens if instead of updating a label, a ws.Alert is used.
It seems the connection to the websocket in put on hold after SMPT send is used.
See attached project.
Questions: Any ideas how to fix = selector or showing an alert after email has been delivered (or not)?
have developed a simple webapp sendmail (another B4JHOWTO using jQuery Mobile).
The mail is sent using SMTP. This works all fine, but after the mail is sent a selector ("lblfooter" as defined in the index.html) is not updated in the html file.
If clicking on a dialog, like about button, the selector is updated.
The same happens if instead of updating a label, a ws.Alert is used.
It seems the connection to the websocket in put on hold after SMPT send is used.
See attached project.
Questions: Any ideas how to fix = selector or showing an alert after email has been delivered (or not)?
B4X:
Sub SendEmail
...
smtpEMail.Initialize with Event SMTP
smtpEMail.Send
...
End Sub
Sub SMTP_MessageSent(Success As Boolean)
Dim msg As String = DateTime.Time(DateTime.Now) & " :: Mail sent "
If Success = False Then
msg = msg & "error."
Else
msg = msg & "successful."
End If
' THIS DOES NOT WORK STRAIGHT - The label is updated after f.e. button About was clicked
lblFooter.SetText(msg)
End Sub