UPDATE TBDD_MODULES SET DB_VERSION = '1.2.0.1' where SHORT_NAME = 'EMLP' 
GO 
ALTER TABLE TBEMLP_HISTORY ADD DATE_DELETED_INBOX DATETIME
GO
-- =============================================
-- Author:			DD MS
-- Creation date:	07.05.2020
-- =============================================
CREATE PROCEDURE PREMAIL_NEW_EMAIL @SENDING_PROFILE TINYINT, @EMAIL_TO VARCHAR(100),@SUBJECT VARCHAR(200),@BODY VARCHAR(MAX),@REF_STRING As VARCHAR(900),@REF_ID BIGINT,@WF_ID INT,@WHO VARCHAR(100) AS 
BEGIN
	INSERT INTO [dbo].[TBEMLP_EMAIL_OUT]
		([SENDING_PROFILE]
		,[WF_ID]
		,[EMAIL_ADRESS]
		,[EMAIL_SUBJ]
		,[EMAIL_BODY]
		,REFERENCE_STRING
		,REFERENCE_ID
		,[ADDED_WHO])
	VALUES (@SENDING_PROFILE,
		@WF_ID,
		@EMAIL_TO,
		@SUBJECT,
		@BODY,
		@REF_STRING,
		@REF_ID,
		@WHO)
END
GO