• the modern database mail uses a service broker, so it's fire and forget; you call sp_send_dbmail with the right parameters, and the proc returns immediately, and the service broker tries to send the email asyncronously...it may be several minutes before it goes out, and the service tries to send three times if it fails the first two, by default, assuming the vagaries of networking and stuff made it fail.

    you would have to catch the returned mail_id, and then check the msdb.dbo.all_mailitems? to see if it really went through, or got an error returned back from the mail server.(no such emailbox, bad email address,box full, no relaying allowed, etc etc)

    why do you want to rollback vs trying to send an email regardless?

    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!