Home Forums Programming General How can I relate retries with the original send in SQL Server Database Mail? RE: How can I relate retries with the original send in SQL Server Database Mail?

  • i believe  msdb.dbo.sysmail_allitems will only have a single row per mail_id, along with it's current status (sent/unsent/failed)

    when a mail does fail, an entry is created in sysmail_event_log
    select
    mailitem_id,
    count(*)
    from msdb.dbo.sysmail_event_log
    group by mailitem_id
    having count(*) > 1;

    SELECT * FROM from msdb.dbo.sysmail_event_log

    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!