Dissection of attached sample code
Dim msg As New Aspose.Network.Mail.MailMessage
We first create a MailMessage instance, which is the container holding the messages or files to send by the SmtpClient
msg.From = New Aspose.Network.Mail.MailAddress("email@example.com")
Set the From email address, let's say the sender of the message
msg.Subject = "hello"
Set the Subject of the message
msg.TextBody = "Please open this mail message by browser"
Set the TextBody of the message, if the mail client of receipients can not read html message, use the TextBody
msg.HtmlBody = "this is a html body"
Set the HtmlBody of the message
Set receipients' email address
'attached a local file to the mail
Add attachement to the mail
'send mail by SmtpClient
Dim client As Aspose.Network.Mail.SmtpClient = New SmtpClient("mail.aspose.com")
client.Port = 25
client.Username = "user"
client.Password = "password"
Creat a SmtpClient instance to connect to your mail server, send the message
'send this message
Catch e As Exception
Feel free to ping me with any problems. We are glad to provide any help or demonstrations if you need.