0% found this document useful (0 votes)
430 views

Configuring SQL Server Database Mail To Use Hotmail

This document provides instructions for configuring SQL Server Database Mail to use Hotmail as the SMTP server. It includes the necessary steps to enter the Hotmail SMTP server details and port number in the Database Mail configuration wizard. It also lists the SMTP server details and port numbers for Hotmail, Gmail, and Outlook that can be used. The document includes a sample script for sending a test email using the sp_send_dbmail stored procedure after configuring Database Mail.

Uploaded by

Khansex Shaik
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
430 views

Configuring SQL Server Database Mail To Use Hotmail

This document provides instructions for configuring SQL Server Database Mail to use Hotmail as the SMTP server. It includes the necessary steps to enter the Hotmail SMTP server details and port number in the Database Mail configuration wizard. It also lists the SMTP server details and port numbers for Hotmail, Gmail, and Outlook that can be used. The document includes a sample script for sending a test email using the sp_send_dbmail stored procedure after configuring Database Mail.

Uploaded by

Khansex Shaik
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Configuring SQL Server Database Mail to use Hotmail

When navigating through the Database Mail configuration wizard, you will encounter
the below screen wherein the relevant details need to be entered. Let's consider the
example of using the SMTP server details for Hotmail. Enter the details as shown
below.

Outgoing Mail Server (SMTP)

 E-mail Address - Enter your Hotmail or Live account


 Server Name - Enter as shown in screenshot
 Port number - Enter as shown in screenshot
 The server requires a secure connection (SSL) - check this box

If this is left unchecked you will encounter this error message, 'The mail could
not be sent to the recipients because of the mail server failure. (Sending Mail
using Account 4 (2011-12-14T23:36:13). Exception Message: Cannot send
mails to mail server. (The SMTP server requires a secure connection or the
client was not authenticated. The server response was: 5.7.0 Must issue a
STARTTLS command first).'
SMTP Authentication

 Select 'Basic authentication'


 User Name - Enter your Hotmail or Live account
 Password - Enter password of your Hotmail or Live account.
 Confirm Password - Enter password of your Hotmail or Live account.

The below table outlines the necessary SMTP server details and port numbers for
Hotmail, Gmail and Outlook.

Mail Service SMTP Server Port Number


Hotmail smtp.live.com 587
Gmail smtp.gmail.com 25, 587
Outlook smtp.office365.com 587

Sending a Test Email Using SQL Server Database Mail


You could also execute the Database Mail system procedure sp_send_dbmail with
the appropriate parameters using this sample script below.

EXEC msdb.dbo.sp_send_dbmail
    @profile_name = 'Enter valid database profile name',
    @recipients = 'Enter Valid Email Address',
    @body = 'This is a test email sent from TEST server',
    @subject = 'TEST EMAIL',

Database Eamil enabling in MSDB:

• sp_CONFIGURE ‘show advanced’, 1


GO
RECONFIGURE
GO
sp_configure ‘Database Mail XPs’,1
reconfigure
GO
ALTER DATABASE [MSDB] SET ENABLE_BROKER WITH NO_WAIT
GO

You might also like