• Rupert ..if you can't get xp_sendmail to run...try using xp_smtpmail . You can get it at http:///www.sqldev.net . I find it to be far more reliable than xp_sendmail.

    One more question..do you have DBO privs with your user on the database? One thing I've noticed is that this type of thing is usually associated with some kind of privs issue. Even if the step fails sometimes, an email will still be sent.

    If you trap the returned status after the step you can tell if the step actually failed.

    HTH


    Mathew J Kulangara
    sqladventures.blogspot.com