Tag Archives: EMAIL

C# WINDOWS FORMS EMAIL

#54 C# WINDOWS FORMS EMAIL TEST

Form C# Email Example

A simple C# WinForms desktop application to send a text email/send an attachment email.

This application uses no special class. The default mail classes are used namely:

using System.Net.Mail;

using System.Net.Mime;

The email text is sent in HTML format:

var mailMessage = new MailMessage{                     From = new MailAddress(Vars._mailFrom),//email            Subject = "C# WinForms Test Mail",                     Body = "<h1>Hello</h1>" + "<h2>C# WinForms Test Mail</h2>",                     IsBodyHtml = true,};