[dbo].[EnqueueOutgoingEmail]
CREATE PROCEDURE [dbo].[EnqueueOutgoingEmail]
@inOutgoingEmailId int
AS
begin
set nocount on
declare @outgoingEmailQueueId int
insert into OutgoingEmailQueue
(
OutgoingEmailFID
)
select @inOutgoingEmailId
set @outgoingEmailQueueId = SCOPE_IDENTITY()
declare @outgoingEmailQueueIds IntList
insert into @outgoingEmailQueueIds
(
Item
)
select @outgoingEmailQueueId
declare @now datetimeoffset = sysdatetimeoffset()
exec SyncOutgoingEmailStatus
@inOutgoingEmailQueueIds = @outgoingEmailQueueIds,
@inActivityTimeStamp = @now,
@inSucceeded = null
end
GO
GRANT EXECUTE ON [dbo].[EnqueueOutgoingEmail] TO [MssExec]
GO