SMTP Server Installation
The customer should set the SMTP server up as they require it. However, for reference the steps to install it are: Go to the Control Panel and then Add/Remove Programs (also known as Programs and Features). Click on the Windows Components/Features link.
Browse to Application Server > Internet Information Services and tick the SMTP service.
Press OK until you are back to the Add/Remove Programs (also known as Programs and Features) screen, then close that.
Click on the Start Menu and click on Run. If this option is not visible, press and hold the Windows key on the keyboard and press R. If the keyboard does not have a Windows key, press Control+Alt+Delete, click on Task Manager, click on File and click on New Task (Run).
Type in inetmgr and press OK/Run.
Expand the server name. You should now see the Default SMTP Virtual Server. This now requires locking down.
Right-click on Default SMTP Virtual Server and click on Properties. Logging should be set to the W3C Extended Log File Format in most cases. Click on the Access tab. Click on the Authentication button.
Make sure Anonymous Access is enabled and the others disabled, and press OK.
Click on the Connection button. Select Only the list below and add 127.0.0.1 to the list. Then press OK.
Click the Relay button. Select Only the list below and add 127.0.0.1 to the list. Untick Allow all computers which successfully authenticate to relay and press OK.
Set up any of the other settings as desired, then when finished click on OK until you’re back to the IIS Manager screen.
Database Mail Setup
First, make sure the e-mail account through which Data Academy is to send e-mails is set up on the mail server, and SMTP is enabled. Then, open up SQL Server Management Studio. Open the Object Explorer and connect to the database server where you want to install database mail. Open up the Management node, right-click on the Database Mail node and select Configure Database Mail, as shown in below:

Configure database mail in SQL Server Management Studio
After right-clicking on Configure Database Mail, the Mail Configuration Wizard splash screen will appear. Click on Next, and select Set up Database Mail, as shown below:

Configure SQL Server Mail with Database Mail Configuration Wizard
Click on Next to continue. If SQL Server tells you that The Database Mail feature is not available, click on "Yes" to enable it. The next thing you'll see is the New Profile form, as below.

Database Mail Configuration Wizard - New Profile
Type a Profile Name of your choice, and an optional description. Click on Add and the window below appears:
Tell SQL Server Database Mail which SMTP mail account to use to send mail
Next, click on OK. The database mail account will be added to the mail profile. You’ve probably noticed that several mail accounts can be added to a profile. This is a great idea, because if one of your mail servers crashes, SQL Server can still send database mail. Built in resilience right from the start! Click on the Next button again, and the screen in below will appear:

Manage Profile Security on Database Mail Configuration Wizard
For the sake of this article, we’ll make the profile a public one by ticking in the check box in the Public column. You might decide to make the profile private later, but let's get things working first. Click on Next again and the following window appears, as below:
Configure System Parameters
We’ll use the default configuration parameters as they work fine in most cases. If you have intermittent problems, you might want to alter the settings on this page. Alter the Retry Attempts and Retry Delay if you have an unreliable connection or heavily loaded mail server. Click on Next again and the summary screen shown in below will appear.

Database Mail Configuration Wizard Setup Complete
Click on Finish and you should see the Configuration window shown as below:

The Final Configuration Screen
Click on Close. Congratulations! You’ve set up your first SQL Server Database Mail service. Now you just need to test it... Testing SQL Server Database Mail is simple. Open SQL Server Management Studio, right click on the Database Mail node, and click on Send Test Email. The window shown below will appear:
Sending a Test Email with Database Mail
At this point, one of two things can happen. If Database Mail has been enabled, then the confirmation window will be seen, confirming that the email was sent successfully:

Database Mail Test Email
However, if Database Mail has not been enabled for the SQL Server, the error message in below will appear immediately: 
SQL Server blocked access to procedure 'dbo.sp_send_dbmail'
Don’t panic! This happens because Microsoft has tied down many out-of-the-box settings in SQL Server to make it secure. Click on OK, but leave the Send a Test Email window open whilst you enable the database mail settings - it takes just a few seconds. To enable database mail, simply click on the following from your Windows Start menu: Programs -> Microsoft SQL Server 2005 ->Configuration Tools -> SQL Server Surface Area Configuration. The window in below will appear
: 
SQL Server 2005 Surface Area Configuration
Click on the hyperlink at the bottom, Surface Area Configuration for Features to open the following configuration window:
Configuring Individual Features to Enable Database Mail
Simply click on the checkbox to Enable Database Mail stored procedures, then click on OK. You can close the Surface Area Configuration screen at this point. Now switch back to the Send a Test Email window and try again. If everything's working at the SQL Server end, you should see a confirmation message. At this point you should check the mailbox of the email account where you sent the test email (in our case, bob.evans@mycompany.com), and you should find that you’ve received an email! Well done - you've successfully set up database mail on SQL Server!