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).
    )
  • 相关阅读:
    animation
    0201 ---背景 tableview
    0129 ---稳定定的 plist介绍
    0127 userdefault
    0127 数据库 我的专家
    0122 ---清理缓存
    0122 清楚缓存
    0122---screach
    0121 --view 可以当作线
    0119吧 iPhone 屏幕尺寸
  • 原文地址:https://www.cnblogs.com/aot/p/2918373.html
Copyright © 2011-2022 走看看