I found this code of the internet that should create a mail message:
'Create an instance of the MailMessage class
Dim objMM As New MailMessage
'Set the properties
objMM.To = "bo*@metaprosystems.com"
objMM.From = "in**@metaprosystems.com"
'If you want to CC this email to someone else...
' objMM.Cc = "so******@someaddress.com"
'If you want to BCC this email to someone else...
' objMM.Bcc = "so*********@someaddress.com"
'Send the email in text format
objMM.BodyFormat = MailFormat.Text
'(to send HTML format, change MailFormat.Text to MailFormat.Html)
'Set the priority - options are High, Low, and Normal
objMM.Priority = MailPriority.Normal
'Set the subject
objMM.Subject = "MetaLabels Trial Version"
'Set the body - use VbCrLf to insert a carriage return
objMM.Body = "Hi!" & vbCrLf & vbCrLf & "How are you doing?"
'Now, to send the message, use the Send method of the SmtpMail
class
SmtpMail.Send(objMM)
This seems to work, I get no error message, but the mail is not sent.
Please advise, if you can.