[dbo].[EmailApiGetOutgoingEmailFileAttachments]
CREATE PROCEDURE [dbo].[EmailApiGetOutgoingEmailFileAttachments]
@inOutgoingEmailIds IntList readonly
AS
begin
set nocount on
select
OutgoingEmailId = OutgoingEmailFileAttachment.OutgoingEmailFID,
Content = OutgoingEmailFileAttachment.Content,
FileName = OutgoingEmailFileAttachment.FileName,
AttachmentPosition = OutgoingEmailFileAttachment.AttachmentOrder
from @inOutgoingEmailIds OutgoingEmailIds
inner join OutgoingEmailFileAttachment on OutgoingEmailIds.Item = OutgoingEmailFileAttachment.OutgoingEmailFID
end
GO
GRANT EXECUTE ON [dbo].[EmailApiGetOutgoingEmailFileAttachments] TO [MssExec]
GO