locked
Database mail sent but not delivered RRS feed

  • Question

  • I am using SQL Server 2008R2 and have configured DB Mail and have successfully sent test emails by right clicking Database Mail and clicking Send Test E-Mail...

    Using the same recipient address, I have sent a test email from mssms query window using

    EXEC msdb.dbo.sp_send_dbmail
    	@profile_name = 'Some Profile',
    	@recipients='somerecipient@comcast.net',
    	@body = 'Test email',
    	@body_format = 'TEXT',
    	@subject = Test Subject'	
    

     

    Checking the DB Mail activity using

    SELECT * FROM msdb.dbo.sysmail_mailitems
    

    shows the mail status as Sent, but the mail does not get received at the destination email address. 

    How do I proceed to troubleshoot why everything looks ok but no message is received by the recipient?

     


    Al G.
    Saturday, November 12, 2011 5:31 PM

Answers

  • Thanks for any help given.  I'm a bit embarassed that the email was working all along but it appeared like delivery was not taking place because a spam filter was catching the messages.  Everything is working fine now.
    Al G.
    • Marked as answer by RentAPlace Monday, November 14, 2011 8:12 PM
    Monday, November 14, 2011 8:12 PM

All replies

  • You need to verify logs from SMTP server. It may quietly ignore email due to big array of reasons.

    Most common are SPAM filters and some validation rules (i.e. invalid sender address, etc.)

    Sunday, November 13, 2011 5:46 AM
  • How do I verify the SMTP server log for comcast.net?  Is there a log on my computer of my SMTP activity other than the DB mail log?
    Al G.
    Sunday, November 13, 2011 12:05 PM
  • What did you enter as outgoing mail server (SMTP) in database mail configuration?

    If you own SMTP server (which usually is the case in enterprise) you need to talk with your SMTP administrator (email server administrator).

    If you connecting directly to SMTP server of your provider, try TCPProxy (http://grinder.sourceforge.net/g3/tcpproxy.html) and look for any suspicions responses.

    Sunday, November 13, 2011 4:47 PM
  • Hi RentAPlace,

    According to your scenario, the article below can help you to troubleshooting this issue:
    Troubleshooting Database Mail: Mail queued, not delivered

    Best Regards,
    Stephanie Lv


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Monday, November 14, 2011 7:45 AM
  • hi

    Could you run the following code

     

    use msdb
    go
    select * from sys.transmission_queue
    


    if its coming back with any result set .. Check transmission_status column where service name like  ExternalMailService

     

    VT


    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker
    Monday, November 14, 2011 8:14 AM
  • Tried the command and got no result set!
    Al G.
    Monday, November 14, 2011 1:44 PM
  • Hi Stephanie,

    After setting mail logging to verbose, I sent an email and using:

    SELECT items.subject,
        items.last_mod_date
        ,l.description 
    FROM dbo.sysmail_allitems as items
    INNER JOIN dbo.sysmail_event_log AS l
        ON items.mailitem_id = l.mailitem_id
    


    I got a reply with the Description "Mail successfully sent". However, the mail did not appear in the recipients's email.  Everything I view on my computer indicates success, but the mail is not properly received.  Also recognize, when I use the "Send Test Email" function of Database Mail in MSSMS, the email IS received properly.

    Since I am using internet mail via Comcast.net, how can I check what is happening at their server that is preventing proper operation?


    Al G.
    Monday, November 14, 2011 2:12 PM
  • Thanks for any help given.  I'm a bit embarassed that the email was working all along but it appeared like delivery was not taking place because a spam filter was catching the messages.  Everything is working fine now.
    Al G.
    • Marked as answer by RentAPlace Monday, November 14, 2011 8:12 PM
    Monday, November 14, 2011 8:12 PM