Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Monday, December 05, 2011

Save infopath 2010 form data to Sharepoint list programmatically

Save infopath 2010 form data to Sharepoint list programmatically
In continuation with my previous post where I created an application page and added the xmlformview control to the page, in this post i will show you how to save the data in the infopath form hosted inside the xmlformview control ( on our cutsom applictaion page) on OnSubmitToHost of the xmlformview.
In this post you will learn how to retrieve user submitted data in infopath form fields (fields are FirstName and LastName) and how to save the whole form in SharePoint library with the name created using FirstName and LastName fields.
Lets first modify the xmlformviewcontrol – Adding the OnSubmitToHost
<fv:XmlFormView ID=”formView” runat=”server” EditingStatus=”Editing” OnSubmitToHost=”FormView_SubmitToHost” Width=”700px”></fv:XmlFormView>
Code for submit to host
protected void FormView_SubmitToHost(object sender, SubmitToHostEventArgs e)
{
SPWeb web = SPContext.Current.Web;
web.AllowUnsafeUpdates = true;
// Load the XML and save it as a byte array
System.Xml.XPath.XPathNavigator navigator = formView.XmlForm.MainDataSource.CreateNavigator();
Byte[] formBytes = System.Text.Encoding.UTF8.GetBytes(navigator.OuterXml);
// Create XmlDocument from the form XML
XmlDocument doc = new XmlDocument();
XmlNamespaceManager nsm = new XmlNamespaceManager(doc.NameTable);
nsm.AddNamespace(“my”, “http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-09-29T22:54:17″);
doc.LoadXml(navigator.OuterXml);
// Load name information from the XML
XmlNode nodeLastName = doc.SelectSingleNode(“/my:myform/my:UserInformation/my:LastName”, nsm);
string name = (nodeLastName != null) ? nodeLastName.InnerText : string.Empty;
XmlNode nodeFirstName = doc.SelectSingleNode(“/my:RoomBooking/my:UserInformation/my:FirstName”, nsm);
string firstname = (nodeFirstName != null) ?nodeFirstName.InnerText : string.Empty;
// Generate file name
string filename = String.Format(“{0}{1}_{2}.xml”, name, firstname, DateTime.Now.ToString(“yyyyMMdd”));
// Open library and save XML
SPFolder formLibrary = web.GetFolder(LIBRARY_NAME);
formLibrary.Files.Add(filename, formBytes);
web.AllowUnsafeUpdates = false;
}

Configure alert settings for a Web application in SharePoint Foundation 2010

Configure alert settings for a Web application in SharePoint Foundation 2010
Published: May 12, 2010 To help users keep track of changes that are made to a Web site, Microsoft SharePoint Foundation 2010 includes the alerts feature, which is an e-mail notification service. Users can configure which alerts they want to receive or send to communicate and track changes to items on a Web site.
Users can create alerts on the following items in a site:
Lists Users are notified of changes to the list, such as when an item is added, deleted, or changed in a list.
List items Users are notified of changes to a particular item in a list.
Document libraries Users are notified of changes to the document library, such as when a document is added, deleted, or changed in a document library or when Web discussions are added, changed, deleted, closed, or started for a document.
Documents Users are notified of changes in a particular document such as when a document is changed, added, deleted, or closed.
Note:
Users must have at least View Items permissions to use alerts. For more information about how to assign user permissions to a Web application, see Plan site permissions (SharePoint Foundation 2010) [ http://technet.microsoft.com/en-us/library/cc287752.aspx ] .

Configure outgoing email in SharePoint Foundation 2010


This article describes how to configure outgoing e-mail for a farm or for a specific Web application for Microsoft SharePoint Foundation 2010. This article also describes how to install and configure the SMTP service that you must use to enable outgoing e-mail.
In this article:
To install the SMTP service
To install IIS 6.0 Management tools
To configure the SMTP service
To set the SMTP service to start automatically
To configure outgoing e-mail for a farm by using Central Administration
To configure outgoing e-mail for a farm by using the Stsadm command-line tool
To configure outgoing e-mail for a specific Web application by using Central Administration
To configure outgoing e-mail for a specific Web application by using the Stsadm command-line tool
After you have installed SharePoint Foundation 2010 and performed the initial configuration of your server farm, you can configure outgoing e-mail. Doing so enables users to create alerts to track such site items as lists, libraries, and documents. In addition, site administrators can receive administrative messages about site administrator issues, such as the information that site owners have exceeded their specified storage space. For more information, see Plan outgoing e-mail (SharePoint Foundation 2010) [ http://technet.microsoft.com/en-us/library/cc287948.aspx ] .
If you want to configure outgoing e-mail for a specific Web application, you must first configure the default outgoing e-mail for all Web applications in the farm. If you configure the outgoing e-mail for a specific Web application, that configuration will override the default configuration for all Web applications in the farm. Note:
You cannot configure outgoing e-mail by using Windows PowerShell.

Plan outgoing email in SharePoint Foundation 2010

Outgoing e-mail is the foundation on which site administrators can implement several e-mail notification features. These features help end users track changes and updates to individual site collections and allow site administrators to deliver status messages.
This article helps site administrators understand both the uses for integrating outgoing e-mail and the requirements for integrating it into their site collections.
In this article:
About outgoing e-mail
Key planning phases of outgoing e-mail
About outgoing e-mail Properly configuring outgoing e-mail is a requirement for implementing e-mail alerts and notifications. The outgoing e-mail feature uses an outbound Simple Mail Transfer Protocol (SMTP) service to relay e-mail alerts and notifications. These e-mail features include the following: Alerts In a large and growing site collection, users need an efficient way to keep up with updates to lists, libraries, and discussions. Setting up alerts provides an effective means to stay on top of changes. For example, if many users work on the same document, the owner of the document can set up alerts to be notified whenever there are changes to this document. Users can specify which areas of the site collection or which documents they want to track and decide how often they want to receive alerts.
Note:
Users must have at least View permissions to set up alerts.

.Net 4 with SharePoint Foundation 2010

Since this has been asked a million times in various forums. Here is the Final word from Michael Foertsch (secretsofsharepoint.com/cs).
The SharePoint Foundation 2010 object model is not accessible using the .NET Framework 4 (or later). Calling any object or method in the object model using any framework version other than .NET 3.5 will throw the following exception:
System.PlatformNotSupportedException
Microsoft SharePoint is not supported with version 4.0.30319.1 of the Microsoft .Net Runtime.
Of course, you can always access the SharePoint objects using the web services interface from your .NET 4 application, but this will only allow limited functionality of the complete object model.

Enable Incoming Email within SharePoint 2007

Enable Incoming Email within SharePoint 2007
SharePoint 2007 allows for emails to be accepted into discussions, document libraries and lists. To enable this functionality, a few steps will need to be followed. One thing to note: integrating SharePoint with Exchange is NOT needed for this functionality, but if you do choose Exchange, you will get some added benefits.
-SMTP Service
You will need to install the SMTP Server Service on the SharePoint server. This is done via add/remove programs, and within the IIS component listing.
-Enable Incoming Email
Now, enable Incoming Email from the Central Administration website. It is found by following: Central Administration > Operations > Incoming Email Settings
-SMTP Connector
You will finally need to configure an SMTP connector within your email server so it knows where to send emails you designate for SharePoint.

Checking Duplicate Values within a list using SpQuery.

try
            {
                SPWeb curentWeb = SPControl.GetContextWeb(Context);
                SPList lst = curentWeb.Lists["Telno"];
                SPQuery sQuery = new SPQuery();
                sQuery.Query = "<Where><Eq><FieldRef Name='Title' /><Value Type='Text'>" + txtFname.Text.ToString().ToLower() + "</Value></Eq></Where>";
                SPListItemCollection myColl = lst.GetItems(sQuery);
                if (myColl.Count > 0)
                {
                    strError += "<Script Language='JavaScript' type='JavaScript'>";
                    strError += "alert('Friend Name Already Available');";
                    strError += "</Script>";
                }
                else
                {
                    strError += "<Script Language='JavaScript' type='JavaScript'>";
                    strError += "alert('Friend Name Not Available');";
                    strError += "</Script>";
                }
            }
            catch (Exception ex)
            {
                strError += ex.ToString();
            }

Configure personalization sites in Moss 2007


Microsoft Office SharePoint Server 2007 provides a template for creating personalization sites. Personalization sites use a Current User Filter Web Part that can be connected to other Web Parts on the page to display content that is personalized for each user who visits the site.
Unlike personal sites, which combine Web Parts that display information configured by Shared Services Provider (SSP) administrators by configuring user profiles and personalization policies with content customized by each user, personalization sites are designed to be customized by site owners for a larger audience.
Site owners are selected during initial deployment by SSP administrators when they configure personalization links. The site owner of each site is typically the site administrator for the site, and decides which audiences to use when targeting the display of the personalization link on the My Site navigation bar.
Site administrators, possibly working with site designers, create and customize personalization sites based on recognized business needs.
Create personalization sites Creation of personalization sites is straightforward. A personalization site can be created by any user who has the create sites permission. Use the following procedure to create a personalization site. Create a personalization site
1. On the Site Actions menu, click Create Site.
2. On the New SharePoint Site page, in the Title and Description section, type a title and description for the personalization site.
3. In the Web Site Address section, type a directory name to complete the URL in the URL name text box.
4. In the Permissions section, select the desired permissions.
5. In the Template Selection section, click the Enterprise tab, and then click Personalization Site.
6. Configure navigation options and site categories depending on the purpose of the site and your site hierarchy and site navigation plans.
7. Click Create.
Design personalization sites Design of personalization sites can be simple or complex depending on the need of the site. The key personalization sites for the initial deployment are identified during site hierarchy planning based on the needs of your organization. Consult site hierarchy planning, and then design each personalization site to meet your identified needs.
The list of Web Parts that can be used in designing personalization sites is provided in part in the planning documentation, developer documentation, and technical reference documentation for Office SharePoint Server 2007. For more information about the full capabilities of Web Parts, see this documentation. The key concept to understand regardless of the exact Web Parts used is how to connect the Current User Filter Web Part to other Web Parts.
Use the following procedure to connect the Current User Filter Web Part to other Web Parts.
Connect the Current User Filter Web Part to other Web Parts 1. On the Site Actions menu, click Edit Page.
2. Add the Web Parts that you want to connect to the filter Web Parts, based on your plan for the design of this site.
3. On the Current User Filter Web Part, click the Edit menu, point to Connections, point to Send Values To, and then click the name of the Web Part that you want to connect to the filter Web Part.
Note:
Some connected Web Parts can accept a default value from the Current User Web Part. The procedure to connect these Web Parts uses the Send Default Value To connection option, but is otherwise the same.

Getting Started with Personalization in Moss 2007.


The first thing you should do is make sure you've created a Shared Service Provider (SSP).
To check this do the following:
1. Go to MOSS 2007 Central Administration
2. Click on Shared Services Administration in left navigation
1. If this list is not empty then click on an SSP
2. If this list is empty then click New SSP and create a Shared Service Provider
Once on the Shared Services Administration page for your SSP you should see at least 3 sections titled: User Profiles and My Sites, Audiences and Search. To get started you'll need to import user profiles from the directory.
To import user profiles:
1. Under User Profiles and My Sites click on the link labeled "User profiles and properties"
2. On the User Profiles and Properties page click on "Configure profile import"
3. Provide a default access account, specify an account that has read access to your directory. Note: This account needs to also have Manage User Profiles rights, verify click on "Personalization services permissions" under User Profiles and My Sites on the SSP Admin page. To keep things simple until you have a grasp of the service you should use the SharePoint Admin account.
4. Click OK
5. On the User Profiles and Properties page click on "Start full import"
6. Verify that import started and wait until import has completed before moving on to other personalization admin tasks (this may take a few hours)
7. After import is complete to view the results click on "View user profiles" on the User Profiles and Properties page
The SSP administrative portion of My Site should have been configured when you created the SSP. So while waiting on profile import to complete you can explore the non administrative parts of My Site.
To create a My Site:
1. Click on My Site in the global actions bar which is in the top right corner of every SharePoint page
2. Wait while your My Site is created
3. After creation is complete check to make sure the name of the site created is titled with your name
1. If not then open a new browser window with your credentials and click the My Site link again or copy the URL behind the My Site link into the browser window. Note: My Site is highly personalized so it works best when its created using your credentials and not those of an admin account or alternate account
4. Follow the links in the Getting Started with My Site web part
Once profile import is complete we can go back to setting up personalization services in the SSP Admin page. Now that we have profiles we can do things with them like create audiences.
To create audiences:
1. Go to the Shared Services Administration page for your SSP.
2. Click on "Audiences" under the section Audiences
3. On the Manage Audiences page click on "Create audience" Note: Audiences should not be created until after you've completed a profile import.
4. Walk through the steps to create a new audiences based on user profile data
5. After you're done creating audiences click on "Start compilation" from the Manage Audiences page Note: Audiences must be compiled before they can be used.
6. After compilation is complete to view the results click on "View audiences" from the Manage Audiences page
Now that we have created new audiences we should put them to use on SharePoint sites by targeting content.
To target content on SharePoint sites:
1. Go to SharePoint site
2. Go to the document library on the site
3. Go to Document Library Settings
4. Click on "Audience targeting settings" under General Settings
5. Enable audience targeting Note: You can do this for any list type not just documents.
6. Go back to the document library
7. Edit or upload a new document
8. Click the Browse button in the Target Audiences field
9. Select an audience you created or search and use an existing distribution list Note: Distribution lists and security groups will only display after you've completed a profile import.
10. Click OK to update the document's properties
To display targeted content on SharePoint sites: 1. Go to the site home page and add the Content Query Web Part
2. Modify the Content Query Web Part
3. Under Query change List Type to Document Library
4. Under Query -> Audience Targeting check "Apply audience filtering"
5. Click OK
6. Verify the items you targeted in the document library only show for people in those audiences.
Now that you've had a chance to see how audience targeting works let's move on to People Search.
To setup people search:
1. Go to Shared Services Administration for your SSP
2. Under Search section click on "Search settings"
3. On Configure Search Settings page find the default content access account
1. If this is not set then provide a default content access account
4. Verify default content access account has Use personal features rights Note: To verify click on "Personalization services permissions" under User Profiles and My Sites on the SSP Admin page. To keep things simple until you have a grasp of the services you should use the SharePoint Admin account.
5. On Configure Search Settings page click on "Content sources and crawl schedules"
6. On the Manage Content Sources page hover over "Local Office SharePoint Server sites" and click the arrow to drop the ECB menu
7. In the drop menu click Start Full Crawl
8. Verify that crawl started and wait until crawl has completed before moving on to search for people
Finding people: 1. Once crawl is complete to main portal site and click on Search in the top navigation area to go to the Search Center
2. In Search Center click on tab labeled "People"
3. Type in a term you added to your profile while exploring your My Site such as a project, skill or responsibility
4. Hit Enter or click the Go button
5. Verify that you and others who match that search term was returned as search results
One area of personalization we haven't touched on at all yet is publishing links to the Office client. Links to SharePoint lists, libraries, and sites can be published to Office 2007 clients as places to easily retrieve or save documents.
To publish links to Office 2007 clients:
1. Go to Shared Services Administration for your SSP
2. Under User Profiles and My Sites click on "Published links to Office client applications"
3. Click New to add a link
4. Provide a URL, name and type for the link
1. If you want to the link to only show for a specific set of people then specify and audience
5. Click OK
To view links in the Office 2007 client: 1. Open Word 2007
2. Open the File Open or Save As dialog box
3. Click on My SharePoint Sites on the left Note: In order for the service to find the SSP you must set the My Site you created earlier as your default My Site.
4. Verify link are presented Note: The service that updates the client runs daily, this is configurable, so if you don't see the link wait at least 24 hours.
Last but not least are Personalization Sites. Personalization sites are the culmination of all the personalization pieces put together to offer users highly personalized mash ups. There is no quick and dirty way to get started with Personalization sites as they do require planning and understanding of your site's content. To get an idea of what they are about and how they connect to the other pieces of personalization and your portal, go to "Plan for personalized content and sites" in the MOSS 2007 Technical Library on TechNet. You can also play around with the features by creating a sub site under your portal using the Personalization site template.
This was just a quick getting started overview of personalization. The MOSS 2007 personalization platform is much richer than can be explained in a getting started blog post. If you want to dive deeper into a particular area of the personalization features that isn’t already covered by the TechNet content referenced above, please leave a comment here.

Personalization in Moss 2007


The first thing you should do is make sure you’ve created a Shared Service Provider (SSP). To check this do the following:

1. Go to MOSS 2007 Central Administration
2. Click on Shared Services Administration in left navigation
1. If this list is not empty then click on an SSP
2. If this list is empty then click New SSP and create a Shared Service Provider
Once on the Shared Services Administration page for your SSP you should see at least 3 sections titled: User Profiles and My Sites, Audiences and Search. To get started you’ll need to import user profiles from the directory.To import user profiles: 1. Under User Profiles and My Sites click on the link labeled "User profiles and properties"
2. On the User Profiles and Properties page click on "Configure profile import"
3. Provide a default access account, specify an account that has read access to your directory. Note: This account needs to also have Manage User Profiles rights, verify click on "Personalization services permissions" under User Profiles and My Sites on the SSP Admin page. To keep things simple until you have a grasp of the service you should use the SharePoint Admin account.
4. Click OK
5. On the User Profiles and Properties page click on "Start full import"
6. Verify that import started and wait until import has completed before moving on to other personalization admin tasks (this may take a few hours)
7. After import is complete to view the results click on "View user profiles" on the User Profiles and Properties page
The SSP administrative portion of My Site should have been configured when you created the SSP. So while waiting on profile import to complete you can explore the non administrative parts of My Site.To create a My Site: 1. Click on My Site in the global actions bar which is in the top right corner of every SharePoint page
2. Wait while your My Site is created
3. After creation is complete check to make sure the name of the site created is titled with your name
1. If not then open a new browser window with your credentials and click the My Site link again or copy the URL behind the My Site link into the browser window. Note: My Site is highly personalized so it works best when its created using your credentials and not those of an admin account or alternate account
4. Follow the links in the Getting Started with My Site web part
Once profile import is complete we can go back to setting up personalization services in the SSP Admin page. Now that we have profiles we can do things with them like create audiences.To create audiences: 1. Go to the Shared Services Administration page for your SSP.
2. Click on "Audiences" under the section Audiences
3. On the Manage Audiences page click on "Create audience" Note: Audiences should not be created until after you’ve completed a profile import.
4. Walk through the steps to create a new audiences based on user profile data
5. After you’re done creating audiences click on "Start compilation" from the Manage Audiences page Note: Audiences must be compiled before they can be used.
6. After compilation is complete to view the results click on "View audiences" from the Manage Audiences page
Now that we have created new audiences we should put them to use on SharePoint sites by targeting content. To target content on SharePoint sites: 1. Go to SharePoint site
2. Go to the document library on the site
3. Go to Document Library Settings
4. Click on "Audience targeting settings" under General Settings
5. Enable audience targeting Note: You can do this for any list type not just documents.
6. Go back to the document library
7. Edit or upload a new document
8. Click the Browse button in the Target Audiences field
9. Select an audience you created or search and use an existing distribution list Note: Distribution lists and security groups will only display after you’ve completed a profile import.
10. Click OK to update the document’s properties
To display targeted content on SharePoint sites: 1. Go to the site home page and add the Content Query Web Part
2. Modify the Content Query Web Part
3. Under Query change List Type to Document Library
4. Under Query -> Audience Targeting check "Apply audience filtering"
5. Click OK
6. Verify the items you targeted in the document library only show for people in those audiences.
Now that you’ve had a chance to see how audience targeting works let’s move on to People Search. To setup people search: 1. Go to Shared Services Administration for your SSP
2. Under Search section click on "Search settings"
3. On Configure Search Settings page find the default content access account
1. If this is not set then provide a default content access account
4. Verify default content access account has Use personal features rights Note: To verify click on "Personalization services permissions" under User Profiles and My Sites on the SSP Admin page. To keep things simple until you have a grasp of the services you should use the SharePoint Admin account.
5. On Configure Search Settings page click on "Content sources and crawl schedules"
6. On the Manage Content Sources page hover over "Local Office SharePoint Server sites" and click the arrow to drop the ECB menu
7. In the drop menu click Start Full Crawl
8. Verify that crawl started and wait until crawl has completed before moving on to search for people
Finding people: 1. Once crawl is complete to main portal site and click on Search in the top navigation area to go to the Search Center
2. In Search Center click on tab labeled "People"
3. Type in a term you added to your profile while exploring your My Site such as a project, skill or responsibility
4. Hit Enter or click the Go button
5. Verify that you and others who match that search term was returned as search results
One area of personalization we haven’t touched on at all yet is publishing links to the Office client. Links to SharePoint lists, libraries, and sites can be published to Office 2007 clients as places to easily retrieve or save documents. To publish links to Office 2007 clients: 1. Go to Shared Services Administration for your SSP
2. Under User Profiles and My Sites click on "Published links to Office client applications"
3. Click New to add a link
4. Provide a URL, name and type for the link
1. If you want to the link to only show for a specific set of people then specify and audience
5. Click OK
To view links in the Office 2007 client: 1. Open Word 2007
2. Open the File Open or Save As dialog box
3. Click on My SharePoint Sites on the left Note: In order for the service to find the SSP you must set the My Site you created earlier as your default My Site.
4. Verify link are presented Note: The service that updates the client runs daily, this is configurable, so if you don’t see the link wait at least 24 hours.www.microsoft.com

Configure outgoing e-mail settings for a specific web application

In this article:
Use this procedure to configure the outgoing e-mail settings for a specific Web application. Before using this procedure, you must first configure the default outgoing e-mail settings for all Web applications by using the procedure described in Configure outgoing e-mail settings (Office SharePoint Server).
Install and configure the SMTP service
Before you can enable outgoing e-mail, you must install the Internet Information Services (IIS) Simple Mail Transfer Protocol (SMTP) service. After determining which SMTP server to use, the SMTP server must be configured to allow anonymous access and to allow e-mail messages to be relayed. Additionally, the SMTP server must have Internet access if you want the ability to send messages to external e-mail addresses, or it must be able to relay authenticated e-mail to a server that has Internet access. The SMTP server that you use can be a server in the farm, or another server.
Install the SMTP service
The SMTP service is a component of IIS.
Important:
Membership in the Administrators group on the local computer is required to complete this procedure.
Install the SMTP service
1.     In Control Panel, click Add or Remove Programs.
2.     In Add or Remove Programs, click Add/Remove Windows Components.
3.     In the Windows Components Wizard, in the Components box, click Application Server, and then click the Details button.
4.     In the Application Server dialog box, in the Subcomponents of Application Server box, click Internet Information Services (IIS), and then click the Details button.
5.     In the Internet Information Services (IIS) dialog box, select the SMTP Service check box.
6.     Click OK to return to the Application Server dialog box.
7.     Click OK to return to the main page of the Windows Components Wizard.
8.     Click Next.
9.     When Windows has finished installing the SMTP service, on the Completing the Windows Components Wizard page, click Finish.
Configure the SMTP service
After installing the SMTP service, configure the service to accept relayed e-mail from servers in your farm.
You can decide to accept relayed e-mail from all servers except those you specifically exclude. Alternatively, you can block e-mail from all servers except those you specifically include. You can include servers individually, or in groups by subnet or domain.
By enabling both anonymous access and e-mail relaying, you increase the possibility that the SMTP server will be used to relay unsolicited commercial e-mail (spam). It is important to limit this possibility by carefully configuring your mail servers to help protect against spam. One way that you can do this is by limiting relaying to a specific list of servers or domain, and preventing relaying from all other servers.
Important:
Membership in the Administrators group on the local computer is required to complete this procedure.
Configure the SMTP service
1.     Click Start, point to All Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
2.     In IIS Manager, expand the server name that contains the SMTP server that you want to configure.
3.     Right-click the SMTP virtual server that you want to configure, and then click Properties.
4.     On the Access tab, under Access control, click Authentication.
5.     In the Authentication dialog box, under Select acceptable authentication methods for this resource, verify that Anonymous access is selected.
6.     Click OK.
7.     On the Access tab, under Relay restrictions, click Relay.
8.     To enable relaying from any server, under Select which computer may relay through this virtual server, select All except the list below.
9.     To accept relaying from one or more specific servers, follow these steps:
a.     Under Select which computer may relay through this virtual server, select Only the list below.
b.     Click Add, and then add servers one at a time by IP address, or in groups by using a subnet or domain.
c.     Click OK to close the Computer dialog box.
10.  Click OK to close the Relay Restrictions dialog box.
11.  Click OK to close the Properties dialog box.
Configure outgoing e-mail settings
Important:
Membership in the Farm Administrators group of the Central Administration site is required to complete this procedure.
Configure outgoing e-mail settings
1.     On the top navigation bar of the SharePoint Central Administration Web site, click Application Management.
2.     On the Application Management page, in the SharePoint Web Application Management section, click Web application outgoing e-mail settings.
3.     On the Web Application E-Mail Settings page, select a Web application by using the Web Application menu in the Web Application section.
4.     In the Mail Settings section, type the SMTP server name for outgoing e-mail (for example, type mail.fabrikam.com) in the Outbound SMTP server box.
5.     In the From address box, type the e-mail friendly address as you want it to appear to e-mail recipients.
6.     In the Reply-to address box, type the e-mail address to which you want e-mail recipients to reply.
7.     On the Character set menu, click the character set that is appropriate for your language.
8.     Click OK.