Free Support Forum -

Email sent confirmation


Please could you give me a VB.NET example of how to test if an email has been sent successfully.

Thanks in advance,


Sub Main()
Dim pm As New Aspose.Email.ProgressMonitor
Dim smtp As New Aspose.Email.SmtpAccount("")
AddHandler pm.MessageSent, AddressOf OnMessageSent
Dim msg As New Aspose.Email.Message
msg.Send(smtp, pm)
End Sub

Private Sub OnMessageSent(ByVal sender As Object, ByVal e As Aspose.Common.Events.EventArgs)
'get the message intance just sent
Dim msg As Aspose.Email.Message = CType(e.RelatedObject, Aspose.Email.Message)

'get the address from the msg
Dim address As Aspose.Email.Address()
address = msg.GetAddresses(Aspose.Email.Address.Type.To)
End Sub

How to validate an email address using