spClone_Email

Parameters

Parameter Parameter Type Mode Description
@PKID int INOUT
@CurrentUsersID int IN
@NewName nvarchar(510) IN
@NewGuid uniqueidentifier IN

Definition

Copy

                CREATE  PROCEDURE [dbo].[spClone_Email]
                (
                      @PKID        int OUTPUT,
                    @CurrentUsersID int,
                    @NewName    nvarchar(510),
                      @NewGuid        uniqueidentifier
                )
                AS
                INSERT INTO [dbo].Email ( 
                    EmailTemplateID,    
                    [Name],    
                    [Description],
                    OwnerID,
                    Guid,
                    Type,
                    Status,
                    ContentHTML,    
                    ContentText,
                    FromAddress,  
                    FromDisplayName,      
                    Subject,            
                    Priority,             
                    ReplyAddress,  
                    ReturnReceipt,     
                    ReturnReceiptAddress,   
                    ForwardDSN,        
                    ForwardDSNAddress,        
                    SendAfterDate,
                    AppealID
                )SELECT               
                    EmailTemplateID,
                    @NewName,     
                    [Description],    
                    @CurrentUsersID,
                    @NewGuid,
                    Type,
                    0,
                    ContentHTML,    
                    ContentText,
                    FromAddress,  
                    FromDisplayName,      
                    Subject,            
                    Priority,             
                    ReplyAddress,  
                    ReturnReceipt,     
                    ReturnReceiptAddress,   
                    ForwardDSN,        
                    ForwardDSNAddress,
                    SendAfterDate,
                    AppealID
                FROM        
                    [dbo].Email
                WHERE       
                    ID = @PKID

                SELECT  @PKID = @@Identity

                exec spAuditThis @CurrentUsersID, 1, @NewGuid, 15