Step (1). Open your visual and select a new project(empty) window base.
Step(2). Add a class file(.cs)
Step (3). Write these code on that file (.cs)
using System;
using System.IO;
using System.Net;
using System.Net.Mail;
using System.Configuration;
namespace Send_Email_Console_CS
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter To Address:");
string to = Console.ReadLine().Trim();
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("64df0df6-5333-4529-8006-e9d3e83ef491")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Output :-
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Step (1). Open your visual and select a new project(empty) window base.
Step(2). Add a class file(.cs)
Step (3). Write these code on that file (.cs)
Note :- username is a valid EmailID and password - real password
Step (4). Add a properties folder ---> Add a class file as AssemblyInfo.cs and write these code on that.
Output :-