Sqlserver can implement the mail function, which is very helpful for daily management. For example, we can write a stored procedure, which has not been corrected for more than three days. ProgramBug. send an email to notify relevant personnel to fix the bug. Some necessary configurations are required for sending emails. My configuration experience is as follows:
Prerequisites: SQL Server is installed, outlook is installed, and outlook is correctly configured.
(1) configure the startup user as the domain user. Sqlserver starts the default local account. The services started by the local account cannot complete the mail sending and receiving function.
Configure domain user startup: Open the -- Administrative Tools -- service on the control panel, find the sqlserver service, and view the properties. Select login in the Properties window. In the login identity, select "this account" and enter the domain user name and password, for example, user: Work \ Andrew, password: 12345.
After configuration, restart the service, and then start the agent service SQLServerAgent, distributed service Distributed Transaction Coordinator
(2) configure the email. Open "mail" in the control panel and select "display Configuration File ". In mail properties, select the default configuration file name and click "copy. Name the new configuration file, such as "mail ".
(3) Open the Enterprise Manager and select "SQL mail" in "Support Services. In the Properties window, enter "mail" in the configuration file box and click test. After the session is successfully started, it will tell you that a session has been started.
OK. Now, the configuration of an sqlserver mail is complete.