Dim oMailMsg As New MailMessage
Dim oMailClient As SmtpClient
oMailMsg.From = New MailAddress("email@example.com")
oMailMsg.To.Add(New MailAddress("firstname.lastname@example.org", "Administrator"))
oMailMsg.Body = "Attached Sample Document for processing."
oMailMsg.Subject = "Sample Mail"
oMailClient = New SmtpClient("smtp.vbadud.com")
The MailMessage class. All messages include a Body, which contains the content of the message. In addition to the body, you might want to send additional files. These are sent as attachments and are represented as instances. To add an attachment to a mail message, add it to the MailMessage..::.Attachments collection. class is used with the
Attachment content can be a String, Stream, or file name. You can specify the content in an attachment by using any of the Attachment constructors.
The MIME Content-Type header information for the attachment is represented by the ContentType property. The Content-Type header specifies the media type and subtype and any associated parameters. Use ContentType to get the instance associated with an attachment.
The MIME Content-Disposition header is represented by the ContentDisposition property. The Content-Disposition header specifies the presentation and file time stamps for an attachment. A Content-Disposition header is sent only if the attachment is a file. Use the ContentDisposition property to get the instance associated with an attachment.
The MIME Content-Transfer-Encoding header is represented by the TransferEncoding property.