Configure and use SQLmail

Source: Internet
Author: User
SQL Server provides an extended storage process for sending and receiving mails through EXCHANGE or OUTLOOK. The following describes these procedures. No xp_startmail @ user, @ password -- @ user and @ password are optional -- You can also open Sup in EnterpriseManager

SQL SERVER provides an extended storage process for sending and receiving mails through EXCHANGE or OUTLOOK. The following describes these processes. No xp_startmail @ user, @ password -- @ user and @ password are optional -- You can also open Sup in Enterprise Manager.

Introduction to the extended stored procedure for sending, receiving, and automatically processing emails using SQL Mail

SQL SERVER provides an extended storage process for sending and receiving emails through EXCHANGE or OUTLOOK. The following describes these processes.

<无>
Xp_startmail @ user, @ password -- @ user and @ password are both optional -- You can also open Support Services in Enterprise Manager, right-click SQL Mail, right-click the menu, and press Start to Start
Xp_stopmail -- you can also use Stop in the menu in the above method to Stop
Xp_sendmail {[@ recipients =] 'recipients [;... n] '} [, [@ message =] 'message> [, [@ query =] 'query> [, [@ attachments =] attachments] [, [@ copy_recipients =] 'Copy _ recipients [;... n] '[, [@ blind_copy_recipients =] 'blind _ copy_recipients [;... n] '[, [@ subject =] 'subject> [, [@ 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> [, [@ dbuse =] 'database>/* Where @ recipients is a required parameter description: parameter description @ recipients recipient, separate @ message with commas (,) in the middle. @ query: determines the valid query executed and attached to the email. In addition to the insert and Delete tables in the trigger, this query can reference any object @ attachments attachment @ copy_recipients CC @ blind_copy_recipients BCC @ subject title @ attach_results specify the name of the column where the query result is sent as an attachment @ no_header without sending the query result @ set_user user Name, the default value is the database used for query by Guset @ dbuse. The default value is the default database */
Xp_readmail [[@ msg_id =] 'message _ number> [, [@ type =] 'type' [OUTPUT] [, [@ peek =] 'peek> [, [@ suppress_attach =] 'reress _ attach> [, [@ originator =] 'sender' OUTPUT] [, [@ subject =] 'subobject' OUTPUT] [, [@ message =] 'message' OUTPUT] [, [@ recipients =] 'recipients [;... n] 'output] [, [@ cc_list =] 'Copy _ recipients [;... n] 'output] [, [@ bcc_list =] 'blind _ copy_recipients [;... n] 'output] [, [@ date_receive D =] 'date' OUTPUT] [, [@ unread =] 'unread _ value' OUTPUT] [, [@ attachments =] 'attachments [;... n] 'output]) [, [@ skip_bytes =] bytes_to_skip OUTPUT] [, [@ msg_length =] length_in_bytes OUTPUT] [, [@ originator_address =] 'sender _ address 'output]/* parameter description: parameter description @ originator sender @ subject topic @ message information @ recipients recipient @ skip_tytes the number of bytes skipped when reading mail Information, used to obtain Mail Information segments in sequence. @ Msg_length: determines the length of all information. It is usually processed with @ skip_bytes */
xp_findnextmsg [[@msg_id =] 'message_number' [OUTPUT]] [,[@type =] type] [,[@unread_only =] 'unread_value> )
Xp_deletemail {'message _ number'} -- delete all emails in the inbox if no email number is specified.

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.