• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 386
  • Last Modified:

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
0
wala_lang
Asked:
wala_lang
  • 4
  • 4
  • 3
1 Solution
 
MikeWalshCommented:
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.
0
 
Anthony PerkinsCommented:
Perhaps I am stating the obvious, but if you are using SQLMail, have you considered checking the Sent Items folder?
0
 
MikeWalshCommented:
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.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Anthony PerkinsCommented:
They should always be saved.
0
 
Anthony PerkinsCommented:
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.
0
 
MikeWalshCommented:
I think 2000 is the same.. 2005 "Database Mail" is a heck of a lot better.. No MAPI required!!!
0
 
Anthony PerkinsCommented:
>>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.

0
 
wala_langAuthor Commented:
its not in the sent items of the mail profile that was used by sqlmail.
0
 
wala_langAuthor Commented:
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.
0
 
MikeWalshCommented:
Well did the mail ever get received? It sounds like that may be a problem.
0
 
wala_langAuthor Commented:
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......
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 4
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now