Stored Procedures [dbo].[AttachInlineToOutgoingEmail]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inOutgoingEmailIdint4
@inInlineAttachmentsOutgoingEmailInlineAttachmentListmax
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
CREATE PROCEDURE [dbo].[AttachInlineToOutgoingEmail]
    @inOutgoingEmailId int,
    @inInlineAttachments OutgoingEmailInlineAttachmentList readonly
AS
begin
    set nocount on

    insert into OutgoingEmailInlineAttachment
    (
        OutgoingEmailFID,
        Content,
        ContentId,
        MimeType
    )
    select
        @inOutgoingEmailId,
        Content = Attachments.Content,
        ContentId = Attachments.ContentId,
        MimeType = Attachments.MimeType
    from @inInlineAttachments Attachments
end
GO
GRANT EXECUTE ON  [dbo].[AttachInlineToOutgoingEmail] TO [MssExec]
GO
Uses