Question about DBMail

  • I just asked my system admin to provide me with the SMTP server details so I can use that info to configure DB mail since we don't have that setup. He asked me how it works like how SQL Server uses this info to send out alerts and I made  that "NO CLUE" face. Can someone please help me understand how SQL Server uses DB mail to send out alerts to users? Just curious.

  • Well, SQL won't *just* send out alerts. You need to set them up. 
    Configuring SMTP relay in a mail profile is the first step. 

    Here is how to set up a mail profile: https://docs.microsoft.com/en-us/sql/relational-databases/database-mail/configure-database-mail

    Then you can configure your own alerts to send email using sp_send_dbmail, or configure an Operator in SQL Agent Properties to receive certain alerts. 
    Setup of built-in SQL Alerts overview here: https://www.mssqltips.com/sqlservertip/1523/how-to-setup-sql-server-alerts-and-email-operator-notifications/

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • Database mail isn't a mail server - that's Exchange.  Database mail needs a mail server because it can't send email.  It builds up what it needs and sends it off to the mail server, which is what actually sends the email.  You provide the SMTP server as a part of the mail profile.  Once you get it set up and tested, you can configure alerts using the link Henrico posted above.

  • DatabaseMail , in a way, is exactly like any other  mail client...office365,ThunderBird, Google Mail, etc. it just uses a connection to a real mail server to forward an email, which the  mail server then distributes.

    you provide it with the connection info:

    1. servername
    2. port
    3. http or https
    4. username
    5. password.
    if that stuff is set up, then you are able to use it to send mail, and after you set up operators to receive job failures, alerts, or emails you send via sp_send_dbmail

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply