question

nikhil.kadam49521 avatar image
nikhil.kadam49521 asked

sysmail_allitems vs sysmail_mailitems

What is the difference between sysmail_allitems and sysmail_mailitems.Some of the mails are available in sysmail_mailitems and not available in sysmail_allitems.Why?
sql server 2012
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

anthony.green avatar image
anthony.green answered
The allitems view has a filter of WHERE (send_request_user = SUSER_SNAME()) OR (ISNULL(IS_SRVROLEMEMBER(N'sysadmin'), 0) = 1) So it depends if your a sysadmin or not, if your not sysadmin it only brings back mails sent by that user,
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

nikhil.kadam49521 avatar image
nikhil.kadam49521 answered
Thanks Anthony
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.