It took me quite some time to figure out how to write information to a SharePoint user profile. The web seemed only full of examples about how to read information from profiles. At the MSDN site there is an example, but they are using the UserProfileService web service.
At the end it turned out to be very simple to update the values in a user profile: just update the value in the property and then do a Commit on the profile.
UserProfileManager uPMgr =
UserProfile profile = uPMgr.GetUserProfile(“Administrator”);
profile[“WorkEmail”].Value = “firstname.lastname@example.org”;