Stored Procedures [dbo].[EnqueueOutgoingEmail]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inOutgoingEmailIdint4
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
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
Uses