SQL Server Configuration Database Mail

Source: Internet
Author: User
Tags imap mail account

  

One, configure mail

  The core of the whole event is to configure the mail service, which requires a mail account and a corresponding mail server. The following QQ Mail as an example to explain.

1. Setting Up mail server

Mailbox Settings-pop3/imap/smtp/exchange/carddav/caldav Service

    

Open the POP3/SMTP service, click Start, then click "Generate Authorization Code" below, will prompt to send a text message, and then obtain the authorization code is the database to send the mail account password.

2. Configure Database Mail

2.1 Connect on database, manage-Database Mail-right-configure Database Mail

    

    

2.2 In the Select Configuration task, if you have added the option "To install Database Mail by performing the following tasks", select "Manage Database Mail accounts and profiles" if it is modified

    

2.3 Configure the SMTP account, if you already have an SMTP account, you can see it in the list below, if not, click Add.

    

2.4 New Database Mail account

A. Account name: Can be added according to the actual situation

B. e-mail address: Open the POP3/IMAP/SMTP/EXCHANGE/CARDDAV/CALDAV service mailbox

C. Display name: Can be added according to the actual situation

D. server name: If the email address is a QQ mailbox, smtp.qq.com.

E. This server requires a secure connection (SSL) to tick.

F. Basic authentication: username is e-mail address; password is authorization code.

    

2.5 After the entry is complete, you can see the SMTP account list.

    

2.6 Next you need to select a secure public configuration, select the file name that you just configured, and then default to the configuration file, it is recommended to choose "No", can be configured according to the actual situation.

    

2.7 Default profile after selecting "No", the system parameters can be modified according to the actual situation.

    

3, test Database Mail.

3.1 Testing in the database interface, such as

    

Enter the recipient's mailbox at the recipient.

    

3.2 Test with SQL script.

EXEC Msdb.dbo.sp_send_dbmail
@profile_name = ' Test ',--configuration file name
@recipients = ' [email protected] ',--Receive email address
@subject = ' Hello ',--email subject
@body = ' ... '--message body content

  

SQL Server Configuration Database Mail

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.