Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Send Hotmail, Outlook, Office365 Email using SMTP C# .NET

SmtpClient SmtpServer = new SmtpClient("smtp.office365.com");
var mail = new MailMessage();
mail.From = new MailAddress("youremail@hotmail.com");
mail.To.Add("to@gmail.com");
mail.Subject = "Test Mail - 1";
mail.IsBodyHtml = true;
string htmlBody;
htmlBody = "Write some HTML code here";
mail.Body = htmlBody;
SmtpServer.Port = 587;
SmtpServer.UseDefaultCredentials = false;
SmtpServer.Credentials = new System.Net.NetworkCredential("youremail@hotmail.com", "password");
SmtpServer.EnableSsl = true;
SmtpServer.Send(mail);
Comment

PREVIOUS NEXT
Code Example
Csharp :: Convert integers to written numbers C# 
Csharp :: how to add gravity without rb in unity 
Csharp :: get first number in string C# 
Csharp :: stop playing audiosource 
Csharp :: oracle c# parameters wont work 
Csharp :: unity mouse button names 
Csharp :: c# on variable change property get set 
Csharp :: bind repeater to dictionary 
Csharp :: c# double without exponential notation 
Csharp :: unity hide mouse first person 
Csharp :: c# how to get a file path from user 
Csharp :: last index for array c# 
Csharp :: c# decimal 4 casas decimais 
Csharp :: How to create a new object instance from a Type 
Csharp :: c# webbrowser write html to text file 
Csharp :: c# float min value 
Csharp :: c# if break 
Csharp :: gql query with parameters 
Csharp :: unity interface 
Csharp :: c# datediff 
Csharp :: HttpClient .net Core add Certificate 
Csharp :: save binary data to file c# 
Csharp :: change a positive number to negative or a negative number to positive 
Csharp :: how to call a method from a class c# 
Csharp :: how to auto format c# code in visual studio 
Csharp :: C3 compare hour 
Csharp :: Unity Input Key Message 
Csharp :: c# compare months 
Csharp :: Code snipet for jump script unity 2d 
Csharp :: custom attribute for auth permission check .net 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =