How to create an HTML e-mail?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
How to create an HTML e-mail?
Rating:
Take the following steps to create an HTML e-mail as follows:
- Create a MailMessage class object as follows:
Dim mail As MailMessage = New MailMessage
Dim from As MailAddress = New MailAddress("content@ucertify.com", "Mark")
Dim to As MailAddress = New MailAddress("sales@ucertify.com", "Allen")
mail.From = from
mail.To = to
mail.Subject ="HTML message"
- Create an HTML message body as follows:
mail.Body = "<html><body><h1>Hello</h1><h2>Hello</h2><h3>Hello</h3><br>This is my first HTML message.<br></body></html>"
mail.IsBodyHtml = True
- Send the message as follows:
Dim myclient As SmtpClient = new SmtpClient("smtp.ucertify.com")
Myclient.Send(mail)
Rating:
Was this information helpful?
Other articles
- Building Graphical User Interface
- System Namespace
- What is the IDisposable interface?
- How to remove a Windows Installer Search?
- How to insert a file as a text in code?
