Link to home
Start Free TrialLog in
Avatar of wala_lang
wala_lang

asked on

track all mails sent out by xp_sendmail

hi experts,

is there a way to track all the mails that was sent out by xp_sendmail?

thanks.

ann
Avatar of MikeWalsh
MikeWalsh
Flag of United States of America image

You mean historically sent by xp_sendmail?

I don't believe you can track that.. You can look in the SQL SERVER Agent log but I doubt that iwll show you anything..

You may be able to track down the context in wish it was called.. Is it called after a certain action that is logged or tracked? Is it called when there is an alert or an error, etc. etc.

But AFAIK, you cannot track mails previously sent by xp_sendmail.

Moving forward you can make sure that each call to the XP also includes an entry into a history table, but this is a moving forward programatic sort of workaround.
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
lol.. sometimes the obvious is just what is needed.. I was thinking of a difficult answer... Very good point in SQLMail, a MAPI profile is required and the typical installation/setup requires outlook installed on the server and it uses the local outlook to send mail messages... Makes perfect sense when you say it, acperkins.. as long as sent items are saved they should be good.
They should always be saved.
I should have added that was true until version 7, but I have never used SQL Mail after that.  So it could well have changed.
I think 2000 is the same.. 2005 "Database Mail" is a heck of a lot better.. No MAPI required!!!
>>I think 2000 is the same.. <<
That depends if it still used MAPI 0.  If yes, then the setting to not save is not supported, hence all mail is saved to the Sent Items folder.

Avatar of wala_lang
wala_lang

ASKER

its not in the sent items of the mail profile that was used by sqlmail.
that's weird.....i found in the sent items some of the stuff that were sent out by xp_sendmail but the one that i was looking for was not there.  i even ran the stored proc (that contains the sending of mail using xp_sendmail) and i got the message "mail sent". but when i checked the sent items it was not there.
Well did the mail ever get received? It sounds like that may be a problem.
yeah, i got the email.  i tested the system so that the recipient is my email add and i got it.  but when i went back to the sent items of the mail profile used by sqlmail its not there......