Configure SQL2000 database to send emails

Source: Internet
Author: User
Tags mssqlserver email account

SQL Server: detailed configuration process for sending emails using SQL Server 2000

 
There are two versions of Outlook mail sending methods in question contact Author: zlp321001@hotmail.com
◆ Use Outlook 2003 to send emails
 
Test environment: windowx XP Outlook: Outlook 2003 test email: zlp321001@126.com
Step 1: Create a configuration file
 
Start-> Control Panel-> mail> double-click mail-> Add-> Configuration File Name (sqlsendmailserver) Add a new email account-> select POP3 (P)-> User information: Name: zlp mail address: zlp321001@126.com login information: User name: zlp321001 password: *** Server Information :( Note: each server information configuration is not the same, refer to this server configuration help, such as Sina is not the same) receiving mail server (POP3) (I): pop3.126.com sending mail server (SMTP) (o): smtp.126.com click other settings-> sending server-> select (my sending server (SMTP) verification required)-> select logon User name: zlp321001 password: *** select Remember password OK test account settings-> success-> next-> OK open outlook software, test whether the email can be received normally. Everything is OK and configure the next step.
Step 2: configure the mail configuration file for the database server
Restart MSSQLServer Service (configured as a domain user) start-> Control Panel-> Administrative Tools-> services-> select MSSQLServer services-> properties-> logon-> Overview (my machine is a user name: zlp, password zlp logon) select the user name and enter the password SQLSERVERAGENT. For example, restart these two services (after outlook is configured, it must be restarted before the SQL mail service is valid)
Step 3: Check whether database verification is successful
 
Enterprise Manager-> Expand server-> Expand support service-> SQL mail-> properties-> found that "sqlsendmailserver" has this configuration file name passed the test
Step 4: write a simple email Program , Test
 
Exec master .. xp_sendmail 'zlp @ zehua.com.cn ', 'test the mail sent from the database 'exec master .. xp_sendmail 'zlp321001 @ zehua.com.cn ', 'test the mail sent from the database' exec master .. xp_sendmail 'qvb0803 @ sina.com.cn ', 'test the mail sent from the database' exec master .. xp_sendmail 'zlp321001 @ hotmail.com ', 'test emails sent from database'

Test was successful, there may be a server latency problem, the author received the mail from both zlp321001@126.com

◆ Use Outlook 2000 to send emails
 
* Test environment: windowx XP Outlook: Outlook 2000 test email: zlp321001@126.com
Step 1: Configure email
 
Choose outlook> enterprise or workgroup tools> Options> email service> reconfigure email support> enterprise or workgroup"
Step 2: configure the configuration file name
 
Start-> Control Panel-> mail-> Add-> manually configure information service-> Configuration File Name (sqlsendmailserver)-> Add-> Internet email-> confirm general: email account: 126 name: zlp unit: zehua email address: zlp321001@126.com server: Server :( refer to the mail settings help manual for each website) receive mail (POP3): pop3.126.com sending server (SMTP ): smtp.126.com receiving email server: Account No.: zlp321001 password: *** select "my server requires authentication" Next-> next-> complete
Step 3: add a personal folder (used to save the temporary file out2003 without setting)
 
Start-> Control Panel-> mail-> Add-> personal folder-> select (PST file)
Step 4: test whether an email can be sent normally Step 5: Start the SQL Service
 
Start-> Control Panel-> Administrative Tools-> services-> Start MSSQLServer service and SQLServerAgent (logon users use domain usernames)
Step 6: test the Database Configuration File
 
Enterprise Manager-> Expand server-> Expand support service-> SQL mail-> properties-> found that "sqlsendmailserver" has this configuration file name passed the test
Step 7: send an email to the test program
Exec master .. xp_sendmail 'zlp @ zehua.com.cn ', 'test the mail sent from the database 'exec master .. xp_sendmail 'zlp321001 @ zehua.com.cn ', 'test the mail sent from the database' exec master .. xp_sendmail 'qvb0803 @ sina.com.cn ', 'test the mail sent from the database' exec master .. xp_sendmail 'zlp321001 @ hotmail.com ', 'test emails sent from database'

Test results, all received messages from "zlp321001@126.com" in four mailboxes

 
-- Simple application example: (after the user registers, the user receives the User Registration Information email) -- Test Table create table users (ID int identity (200), name varchar (50), email varchar )) go -- trigger, create trigger tr_users_ I on usersfor insertasdeclare @ email varchar (200) Select @ email = email from insertedexec ('exec master .. xp_sendmail ''' + @ email + ''', ''' registered successfully ''') -- insert test data into users (name, email) values ('zlp ', 'zoulp @ jrj.com.cn ')

SQL Server: detailed configuration process for sending emails using SQL Server 2000

From: http://blog.csdn.net/zlp321002/archive/2005/11/04/523113.aspx

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.