Include below namespace
using System.Net;
using System.Net.Mail;
using System.Net.Configuration;
C# Code Here
string strFromEmail= "";
string strToEmail = "";
string strSubject= "";
string strBody= "";
MailMessage mailMessage = new MailMessage(strFromEmail, strToEmail, strSubject, strBody);
mailMessage.IsBodyHtml = true;
SmtpClient smtpClient = new SmtpClient();
smtpClient.Host = "relay-hosting.secureserver.net";
smtpClient.Port = 25;
smtpClient.Credentials = CredentialCache.DefaultNetworkCredentials;
smtpClient.Send(mailMessage);
Thanks
This blog is about developers who are working on MS Technologies and mobile development. You can find very interesting stuff related to MS Technologies like ASP.NET, C#, VB.NET, SharePoint 2003, SharePoint 2007, MS SQL SERVER 2000 , MS SQL SERVER 2005, MS SQL SERVER 2008 and about latest technologies. Also people can also post stuffs related MS Dynamics CRM 3.0, MS Dynamics CRM 4.0 , MS Dynamics GP, Ms Dynamics Soloman.
Showing posts with label Email. Show all posts
Showing posts with label Email. Show all posts
Wednesday, January 18, 2012
Subscribe to:
Posts (Atom)