Private Sub ContactUsProcess
'define a map to hold the form contents
Dim m As Map
'read the page contents to a map
m = GetContents
'validate the form contents where required
If Validate(m) = False Then
Return
End If
Dim fullname As String = m.get("fullname")
Dim email As String = m.get("email")
Dim mobilephone As String = m.get("mobilephone")
Dim comment As String = m.get("comment")
Try
page.IsPaused = True [This never gets fired]
'the form contents are ok, continue with the email send
' start smtp to send the emails
smtp.Initialize("smtp.saix.net", 25, "username", "password", "smtp")
smtp.To.Add("anele@mbangas.com")
smtp.Body = ABMShared.Replace("FullName: " & fullname & "||Email: " & email & "||MobilePhone: " & mobilephone & "||Comment: " & comment & "||", "|", CRLF)
smtp.Subject = "lfjss: Contact Us"
smtp.Send
Catch
page.IsPaused = False
myToastId = myToastId + 1
page.ShowToast("toast" & myToastId, "toastred", "Email could not be sent, please try again.", 3000)
End Try
End Sub