how frequently does the letter "e" appear in:
q: getting user email from full name i want to get email of users who are uploading documents in a library. you know there is a field called "created by" which contain full name, so i want to read that name and then find that user's email.  
is there a way to do it without querying active directory?  
there is another method (given below) but for it to work you need to know userid of user.
spsite ositecollection = spcontext.current.site;
using (spweb owebsite = ositecollection.allwebs["website_name"])
{
    spuser ouser = owebsite.allusers["user_name"];

    ouser.email = " e-mail_address";

    ouser.update();
}

what i have is full name only which is saved in "created by" field of any library.

a: try the below code snippet
spweb owebsite = spcontext.current.web;

spdocumentlibrary odocumentlibrary = (spdocumentlibrary)owebsite.lists["doclib_name"];

splistitemcollection colllistitems = odocumentlibrary.items;

foreach (splistitem olistitem in colllistitems)
{
   var strauthor = olistitem["author"].tostring();
   var author = new spfielduservalue(web, strauthor);
   spuser user = author.user;
   var email = user.email;
}


a: fixed it by using the following code:
spfielduservaluecollection users = new spfielduservaluecollection(web, item["author"].tostring());

    foreach (spfielduservalue userdetail in users)
    {
        spuser user = userdetail.user;
        string email = userdetail.email;
    }


user
The text includes 138 "e"s in total.
assistant