Configuring SQL Server Database Mail To Use Hotmail
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.
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
The below table outlines the necessary SMTP server details and port numbers for
Hotmail, Gmail and Outlook.
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',