I wonder how to get the email for a specific user. I want to send an email to the user that created a specific item in a list. I can get the user by using the following
SPWebApplication webApplication = this.Parent as SPWebApplication;
SPContentDatabase contentDb = webApplication.ContentDatabases[contentDbId];
SPList taskList = contentDb.Sites[0].RootWeb.Webs["Subsite"].Lists["Tasks"];
foreach (SPListItem task in taskList.Items)
{
String user = task["Author"].ToString();
}
Is there a way I can get the user email address from there?