Resolves how to configure a mail session in SQL Server Agent _mssql

Source: Internet
Author: User
Tags mail account

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.