All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
如何用PHP制作静态网站的模板框架_php资料_编程技术
使用SQL存储过程有什么好处_[SQL,Server教程]
ASP.NET,入门的五个步骤_[Asp.Net教程]
ASP.Net生成一个简单的图片_[Asp.Net教程]
基于标准的web项目开发模式探索_JavaScript技术_编程技术
如何实现Asp与Asp.Net共享Session_.net资料_编程技术
如何重起,停止,启动httpd服务?_php资料_编程技术
DB2,9和ASP.NET2.0构建下一代应用程序之一_[Asp.Net教程]
C#控制语句中的switch语句用法
PHP5中新增加的日期
Reading number is top 10 pictures
9.3阅兵全景图4-陸海空现代化兵种方阵梯队
yy365网站上的美女3
沙漠里的美女
Beauty shocked Japan Tokyo motor show model
The goddess of the single reason1
Forced sex girl living abroad1
Forced sex girl living abroad2
张家界的玻璃桥
什么叫国家
中国女孩大胆自拍,显露完美身材2
Download software ranking
Boxer Classic video2
The king of fighters 97(Mobile phone games-apk)
Tram sex maniac 2 (H) rar bag17
Unix video tutorial6
Unix video tutorial13
matrix2
Sora aoi 120 minutes
Tram sex maniac 2 (H) rar bag16
Popkart Cracked versions Mobile phone games
Unix video tutorial8
归海一刀 published in(发表于) 2014/2/1 0:19:26 Edit(编辑)
利用SQL,Server发邮件_[SQL,Server教程]

利用SQL,Server发邮件_[SQL,Server教程]

利用SQL Server发邮件_[SQL Server教程]

SQL Server提供了通过EXCHANGE或OUTLOOK收发邮件的扩展存储过程,下面将这几个过程简单的介绍一下。
  
  一、启动SQL Mail  



xp_startmail @user,@password


  @user和@password都是可选的
  
  也可打开Enterprise Manager中的Support Services,在SQL Mail上单击右键打开右键菜单,然后按Start来启动
  
  二、停止SQL Mail
  
  xp_stopmail
  
  也可用上述方法中的菜单里的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']



  其中@recipients是必需的
  
  参数说明:
  
  参数 说明
  
  @recipients 收件人,中间用逗号分开
  
  @message 要发送的信息
  
  @query 确定执行并依附邮件的有效查询,除触发器中的插入表及删除表外,此查询能引用任何对象
  
  @attachments 附件
  
  @copy_recipients 抄送
  
  @blind_copy_recipients 密送
  
  @subject 标题
  
  @attach_results 指定查询结果做为附件发送
  
  @no_header 不发送查询结果的列名
  
  @set_user 查询联接的用户名,默认为Guset
  
  @dbuse 查询所用的数据库,默认为缺省数据库

四、阅读邮件收件箱中的邮件  




xp_readmail [[@msg_id =] 'message_number'] [, [@type =] 'type' [OUTPUT]]
  
  [,[@peek =] 'peek']
  
  [,[@suppress_attach =] 'suppress_attach']
  
  [,[@originator =] 'sender' OUTPUT]
  
  [,[@subject =] 'subject' OUTPUT]
  
  [,[@message =] 'message' OUTPUT]
  
  [,[@recipients =] 'recipients [;...n]' OUTPUT]
  
  [,[@cc_list =] 'copy_recipients [;...n]' OUTPUT]
  
  [,[@bcc_list =] 'blind_copy_recipients [;...n]' OUTPUT]
  
  [,[@date_received =] '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]] 

 
  参数说明:
  
  参数 说明
  
  @originator 发件人
  
  @subject 主题
  
  @message 信息
  
  @recipients 收件人
  
  @skip_tytes 读取邮件信息时跳过的字节数,用于顺序获取邮件信息段。
  
  @msg_length 确定所有信息的长度,通常与@skip_bytes一起处理长信息
  
  五、顺序处理下一个邮件 




  xp_findnextmsg [[@msg_id =] 'message_number' [OUTPUT]]
  
  [,[@type =] type]
  
  [,[@unread_only =] 'unread_value'])


  六、删除邮件
  
  xp_deletemail {'message_number'}
  
  如果不指定邮件编号则删除收件箱中的所有邮件
  
  七、自动处理邮件



sp_processmail [[@subject =] 'subject']
  
  [,[@filetype =] 'filetype']
  
  [,[@separator =] 'separator']
  
  [,[@set_user =] 'user']
  
  [,[@dbuse =] 'dbname']


来源:网络







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.