I have this code that has a few errors.
Can anyone help? Much thanks ...
Try
Dim newMail = New Mail()
newMail.FromDisplayName = User.Identity
newMail.From = User.ToString
For Each member As MembershipUser In Membership.GetAllUsers()
'Send an email to approved users ONLY
If member.IsApproved Then
newMail.SendMail(New () {member.Email}, Subject.Text, Body.Text)
End If
Next
lblResults.Text = "Your message has been sent successfully."
Catch ex As Exception
lblResults.Text = "Oops ERROR: " + ex.Message
End Try
Go to the complete details ...