Correctly configure and use SQLmail. Some time ago, I spent a lot of effort on configuring and using SQLmail. _ Rambo asked me to sort out relevant documents for sharing. I described the process of configuring SQLmail. a while ago, I spent a lot of time and finally completed the configuration and use of SQL mail.
_ Rambo asked me to sort out relevant documents for sharing.
I will describe the process of configuring SQL mail.
I use SQL mail to complete the following functions:
> After a user registers online, the system sends the randomly generated password to the user registration Email.
> When a user replies to a forum post, the content is sent to the user's Email.
Because the above process is completed in the stored procedure, it avoids the front-end program's parameter
It is convenient to use third-party components for transmission and processing.
1. in order to use SQL mail, first you have an SMTP service on your server. instead of installing the SMTP provided by win2000 server, I use imail6.04 SMTP, which is stable and powerful.
2. install an email system. I installed outLook 2000 and found that when configuring the Mail profile, if
If outLook is not installed but other third-party programs are used, "email" cannot be found in the control panel of win2k Chinese server.
3. after outlook is installed, refresh the control panel and you will find the email item. double-click the email configuration to name the configuration file (for example, myProfile ), in this configuration file, you can set attributes for SQL mail later.
4. start outlook (set myProfile as the default configuration file) and test sending and receiving emails to confirm that outlook works properly.
5. start SQL server with the current domain account. in the enterprise manager support service, click SQL mail attributes. you can see that in the configuration file selection, the myProfile configuration file you just defined appears (you can also define multiple profiles). select this configuration file for testing. the SQL statement returns the information about the successful start and end of an MAPI session, if an error occurs or the email configuration file is not found, it must be because the account you used to start SQL server has a problem.
6. now you can use the XP_sendmail extended stored procedure in the query analyzer to send SQL mail in the following format:
Xp_sendmail {[@ recipients =] 'Recipients [;... n] '}
[,] [@ Message =] 'message']
[,] [@ Query =] 'query']
[,] [@ Attachments =] attachments]
[,] [@ Copy_recipients =] 'copy _ recipients [;... n]'
[,] [@ Blind_copy_recipients =] 'blind _ copy_recipients [;... n]'
[,] [@ Subject =] 'subobject']
[, [@ Type =] 'type']
[,] [@ Attach_results =] 'Attach _ value']
[,] [@ No_output =] 'output _ value']
[,] [@ No_header =] 'header _ value']
[,] [@ Width =] width]
[,] [@ Separator =] 'separator']
[,] [@ Echo_error =] 'echo _ value']
[,] [@ Set_user =] 'user']
Configure and use of secure mail. _ Rambo asked me to sort out relevant documents for sharing. I will describe the process of configuring SQL mail...