zoukankan      html  css  js  c++  java
  • How to send mail through SQL mail

    1. Configure sql mail

    Double click Database Mail in Management node in SSMS, set up new e-mail profile and specify its smtp account and relevancy

    2. After configuration, execute script below.

    use msdb
    GO
    
    exec sp_send_dbmail @profile_name='SQLAutherity',
    @recipients='bocks@sqlauthority.com',
    @subject='Test Message',
    @body='This is the body of the test message. 
    Congrates database mail received by you successfully.'

    Attention, right click the Database Mail node, then select ‘View Database Mail Log’ to watch the status of process of DB mail, I got some error message coz of the connection rejected, Firewall, or 25 port blocked.

    Message
    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2013-02-20T11:30:28). Exception Message: Could not connect to mail server. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 220.181.15.112:25).
    )
  • 相关阅读:
    团队博客——1
    团队博客3
    团队博客6
    团队博客2
    团队博客8
    团队博客4
    团队博客7
    安装“消息队列 (MSMQ)”
    服务端上传文件到共享目录
    数据库变成可疑状态
  • 原文地址:https://www.cnblogs.com/aot/p/2918373.html
Copyright © 2011-2022 走看看