Online provides a lot of SQL Server to send mail articles, reproduced in the majority, most of the introduction of win2000+outlook2003 environment, in the operating system and office has been replaced today, the significance is small.
Now I have a problem with the need to use SQL Server to send mail, the following text:
Objective: To establish operator monitoring job completion using SQL Server Agent's mail session
Test environment:
Operating system: Windows 2003/windows XP
Outlook:outlook 2003
e-mail for test: yyy@xxx.com
First step: Build the configuration file
Start-> control plate-> mail > Double click Mail-> Add-> profile name (mysqlfile)
Add a new e-mail account-> Select POP3 (P)->
User information:
Name: yyy
Mailing Address: yyy@xxx.com
Login information:
User name: yyy
Password: * * *
Incoming mail server (POP3) (I): pop3.xxx.com
Outgoing mail server (SMTP) (O): smtp.xxx.com
Click on the other Settings-> send server-> check (my send server (SMTP) requires authentication)-> Choose Login to use
User name: yyy
Password: * * *
Select Remember Password
Are you sure
Test Account Settings-> successful-> next-> OK
Open Outlook software, test to receive mail, everything OK, the next configuration
Note: After Outlook is configured, you must reboot
(In other settings in the e-mail account, forget to set up the sending server, confirm that it can be sent)
Step Two: Configure the database server to use the mail configuration file
Start-> control face version-> management Tools-> Service-> Select SQLServerAgent service-> Properties-> login->
Select this account (fill in the current login operating system username password), do not select the Local System account
Step three: Database validation is successful
Enterprise Manager-> Expand Server-> Manage->sqlserver agent-> mail session-> mail profile dropdown box select Mysqlfile Point "Test pop-up" has successfully started (and stopped) a mail session with this profile "that means success."
Click OK to restart the SQL Server Agent service.
Step Fourth: Test the message
Enterprise Manager-> Expand Server-> admin->sqlserver proxy-> operator-> new operator-> Properties-> General tab
Enter a test mailbox in the e-mail name: aaa@bbb.com point "test" can go to aaa@bbb.com to receive mail
Note: You must keep Outlook open throughout the process
If you configure SQL Server's mail profile and then try opening Outlook, it fails, and pops up Unable to open the default e-Mail Folder dialog box, because SQL Server occupies a mail profile, you need to stop the SQLServerAgent service, open Outlook, and then start the SQLServerAgent service