How to send email in SharePoint
private void SendEmail()
{
// Build the email subject
System.Text.StringBuilder subject = new System.Text.StringBuilder();
subject.Append(“New TimeSheet has been added “);
subject.Append(txtEmailAddress.Text);
// Build the email body message
System.Text.StringBuilder message = new System.Text.StringBuilder();
message.Append(“Employee Name: “);
message.AppendLine(txtEmpName.Text.Trim());
message.AppendLine();
message.Append(“Email Address: “);
message.AppendLine(txtEmailAddress.Text);
message.AppendLine();
message.Append(“WeekEnd: “);
message.AppendLine(WeekCalendar.SelectedItem.Text.Trim());
message.AppendLine();
// Construct the message header
System.Collections.Specialized.StringDictionary messageInfo =
new System.Collections.Specialized.StringDictionary();
// Where to send the email
messageInfo.Add(“to”, “himadrish@gmail.com”);
// From which email account this email
messageInfo.Add(“from”, “himadrish@hotmail.com”);
messageInfo.Add(“content-type”, “text/plain”);
messageInfo.Add(“subject”, subject.ToString());
// Send the email
Microsoft.SharePoint.Utilities.SPUtility.SendEmail(SPContext.Current.Web, messageInfo, message.ToString());
}
It requires that your IIS/WFS SMTP engine is running to execute this email.

How soon will you update your blog? I’m interested in reading some more information on this issue.
Thanks Gary for your post.
As this is new born baby now, so it will take some time from designing and decoration aspect. However I promise to post article atleast twice in a month.
Hey, nice post, really well written. You should write more about this.
Me and my close friend had been arguing about an issue related to this! Now I know that I was correct. lol! Appreciate it for the details you post.