c# send email
C#
using System;
using System.Windows.Forms;
using System.Net.Mail;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
mail.From = new MailAddress("[email protected]");
mail.To.Add("to_address");
mail.Subject = "Test Mail";
mail.Body = "This is for testing SMTP mail from GMAIL";
SmtpServer.Port = 587;
SmtpServer.Credentials = new System.Net.NetworkCredential("username", "password");
SmtpServer.EnableSsl = true;
SmtpServer.Send(mail);
MessageBox.Show("mail Send");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
}
}
Also in C#:
- Title
- c# string to lowercase
- Category
- C#
- Title
- unity string format time
- Category
- C#
- Title
- Rigidbody.addforce
- Category
- C#
- Title
- c# adding to a list
- Category
- C#
- Title
- asp list box
- Category
- C#
- Title
- while loop in c#
- Category
- C#
- Title
- unity quaternion
- Category
- C#
- Title
- unity create primitive
- Category
- C#
- Title
- c# stringbuilder
- Category
- C#
- Title
- how to create a variable in C#
- Category
- C#
- Title
- c# mathf.ceiling
- Category
- C#
- Title
- how to pause physics in unity c#
- Category
- C#
- Title
- c# get executable path
- Category
- C#
- Title
- sqlite connection c#
- Category
- C#
- Title
- unity calculate path
- Category
- C#
- Title
- c# md5 int
- Category
- C#
- Title
- how to name GameObject in c#
- Category
- C#
- Title
- access object property C#
- Category
- C#
- Title
- isprime c#
- Category
- C#
- Title
- .sh script: check if file exist
- Category
- C#
- Title
- unity 2d top down movement
- Category
- C#
- Title
- c# string remove special characters
- Category
- C#
- Title
- call a function c#
- Category
- C#
- Title
- c# read excel file
- Category
- C#
- Title
- unity make a int arry with preset values
- Category
- C#
- Title
- c# iorderedenumerable to dictionary
- Category
- C#
- Title
- xml node update attribute value c#
- Category
- C#
- Title
- parsing string to int c#
- Category
- C#
- Title
- enums as numbers c#
- Category
- C#
- Title
- mvc input type file
- Category
- C#
- Title
- c# remove spaces from string
- Category
- C#
- Title
- c# print
- Category
- C#
- Title
- microsoft input tool need .net framework
- Category
- C#
- Title
- c# how to compare 2 dates without time
- Category
- C#
- Title
- array to list C
- Category
- C#
- Title
- copy to clipboard unbity
- Category
- C#
- Title
- unity check if gameobject is active
- Category
- C#
- Title
- c# get enum value from string
- Category
- C#
- Title
- creating a c# class
- Category
- C#
- Title
- first sentence letter capital in c#
- Category
- C#
- Title
- c# number suffixes
- Category
- C#
- Title
- eventos c#
- Category
- C#
- Title
- c# long to int
- Category
- C#
- Title
- prefab gets character transform
- Category
- C#
- Title
- scaffold-dbcontext sql server
- Category
- C#
- Title
- c# to vb.net
- Category
- C#
- Title
- how to clear console through script unity
- Category
- C#
- Title
- c# array isn't working
- Category
- C#
- Title
- basic sorting algorithms c#
- Category
- C#
- Title
- list.addrange in c#
- Category
- C#
- Title
- create object in c#
- Category
- C#
- Title
- using serial port in c#
- Category
- C#
- Title
- json serialize object capitalization config
- Category
- C#
- Title
- abstract class c#
- Category
- C#
- Title
- no entity framework provider found for the ado.net provider with invariant name
- Category
- C#
- Title
- .net directorysearcher get manager accountname
- Category
- C#
- Title
- c# remove last character from string
- Category
- C#
- Title
- how to put double quotes in a string c#
- Category
- C#
- Title
- max of array C#
- Category
- C#
- Title
- C# check many strings quickly
- Category
- C#
- Title
- unity onclick addlistener
- Category
- C#
- Title
- c# keyboard enter
- Category
- C#
- Title
- where keyword in c#
- Category
- C#
- Title
- c# reverse string
- Category
- C#
- Title
- how to switch scenes unity
- Category
- C#
- Title
- c# expression func automatically select return type
- Category
- C#
- Title
- unity get component
- Category
- C#
- Title
- .net identity seed users and roles
- Category
- C#
- Title
- json tiers dot in name c#
- Category
- C#
- Title
- download and run exe c# 1 button
- Category
- C#
- Title
- unity rigidbody constraints
- Category
- C#
- Title
- windows form rounded corners
- Category
- C#
- Title
- c# trim string
- Category
- C#
- Title
- c# print to console
- Category
- C#
- Title
- C# events
- Category
- C#
- Title
- as c#
- Category
- C#
- Title
- unity cast float to int
- Category
- C#
- Title
- unity 2d platformer movement script c#
- Category
- C#
- Title
- c# if statement
- Category
- C#
- Title
- C# get all files in directory
- Category
- C#
- Title
- c# append array
- Category
- C#
- Title
- Request.Form
- Category
- C#
- Title
- linq foreach c#
- Category
- C#
- Title
- C# webclient immitate browser
- Category
- C#
- Title
- how to make a game
- Category
- C#
- Title
- Execute code every x seconds with Update()
- Category
- C#
- Title
- making a list of chars in c#
- Category
- C#
- Title
- C# webclient submit form
- Category
- C#
- Title
- C# assigning image location
- Category
- C#
- Title
- change sprite of gameobject unity
- Category
- C#
- Title
- Unity C# make object face away
- Category
- C#
- Title
- iformfile blobclient
- Category
- C#
- Title
- c# convert dictionary to anonymous object
- Category
- C#
- Title
- how to find the area of a circle
- Category
- C#
- Title
- c# fold list
- Category
- C#
- Title
- .net core get image from url
- Category
- C#
- Title
- how do loops on C#
- Category
- C#
- Title
- c# making a folder
- Category
- C#
- Title
- c# index in select
- Category
- C#
- Title
- check if multiple variables are null c#
- Category
- C#