Hi,
I found that Stored Procedure [DSW].[dbo].[webAddUserAndObjectToWorkFlowIns] has an e-mail address (DoNotReply@boaweb.com) hardcoded around line 93:
INSERT INTO ttWorkFlowUser
(WorkFlowUserID,
UserID,
WaveProcessAreaOBjectID)
VALUES (@WorkFlowUserID,
@UserID,
@WaveProcessAreaObjectID)
INSERT INTO ttWorkFlow
(WorkFlowID,
WorkFlowUserID,
[Subject],
Body,
[To],
[From],
MessageTypeID)
VALUES (@WorkFlowID,
@WorkFlowUserID,
@Subject,
@Body,
@UserID,
'DoNotReply@boaweb.com', -- HERE
@MessageTypeID)
This may prevent all e-mails from Transform to be denied by customers’ SMTP servers due to the domain. We normally change this stored procedure after each SMTP configuration so it looks like this:
USE [DSW]
GO
/****** Object: StoredProcedure [dbo].[webAddUserAndObjectToWorkFlowIns] Script Date: 2/13/2020 3:20:54 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[webAddUserAndObjectToWorkFlowIns]
(
@UserID NVARCHAR(50),
@WaveProcessAreaObjectID UNIQUEIDENTIFIER)
AS
DECLARE @WorkFlowUserID UNIQUEIDENTIFIER
DECLARE @Body NVARCHAR(MAX)
DECLARE @Subject NVARCHAR(500)
DECLARE @MessageTypeID UNIQUEIDENTIFIER
DECLARE @Wave NVARCHAR(250)
DECLARE @ProcessArea NVARCHAR(250)
DECLARE @Object NVARCHAR(250)
DECLARE @Targets NVARCHAR(MAX)
DECLARE @WorkFLowID UNIQUEIDENTIFIER
-- [13/02/2020 | Leonardo Galski / Kinga Niec] Update the sender address to match the default one configured in Admin > Configuration > Parameters > Default Email Address
DECLARE @EmailFrom NVARCHAR(500)
SELECT @EmailFrom = DefaultEmailAddress FROM [CranSoft].[dbo].[Param]
-- [13/02/2020 | Leonardo Galski / Kinga Niec] Update the sender address to match the default one configured in Admin > Configuration > Parameters > Default Email Address
IF NOT EXISTS (SELECT
1
FROM
ttWorkFlowUser
WHERE
UserID = @UserID
AND WaveProcessAreaObjectID = @WaveProcessAreaObjectID)
BEGIN
SET @WorkFlowUserID = Newid()
SET @WorkFLowID = Newid()
SET @MessageTypeID = 'B9361E96-19A7-45B1-860A-8624DA9B2FB0' --Common Message and Email
SELECT
@Object = [Name]
FROM
Console.dbo.apiConsoleWaveProcessAreaObjectSel
INNER JOIN Console.dbo.apiConsoleObjectSel
ON Console.dbo.apiConsoleWaveProcessAreaObjectSel.ObjectID = Console.dbo.apiConsoleObjectSel.ObjectID
WHERE
WaveProcessAreaObjectID = @WaveProcessAreaObjectID
SELECT
@ProcessArea = ProcessArea,
@Wave = WaveName
FROM
Console.dbo.apiConsoleWaveProcessAreaObjectSel
INNER JOIN Console.dbo.apiConSoleProcessAreaSel
ON Console.dbo.apiConsoleWaveProcessAreaObjectSel.WaveProcessAreaID = Console.dbo.apiConSoleProcessAreaSel.WaveProcessAreaID
INNER JOIN Console.dbo.apiConsoleWaveSel
ON Console.dbo.apiConSoleProcessAreaSel.WaveID = Console.dbo.apiConsoleWaveSel.WaveID
WHERE
Console.dbo.apiConsoleWaveProcessAreaObjectSel.WaveProcessAreaObjectID = @WaveProcessAreaObjectID
SELECT
@Targets = COALESCE(@Targets + ',</br> ', '')
+ [Target]
FROM
Console.dbo.apiConsoleTargetSel
WHERE
WaveProcessAreaObjectID = @WaveProcessAreaObjectID
SELECT
@Body = dbo.webWriteWorkFlow(Body, @Wave, @ProcessArea, @Object, @Targets),
@Subject = [Subject]
FROM
ttWorkFlowMessage
WHERE
WorkFlowMessageID = '8AAECD61-D95A-4790-986F-F81B9A210A0F'
INSERT INTO ttWorkFlowUser
(WorkFlowUserID,
UserID,
WaveProcessAreaOBjectID)
VALUES (@WorkFlowUserID,
@UserID,
@WaveProcessAreaObjectID)
INSERT INTO ttWorkFlow
(WorkFlowID,
WorkFlowUserID,
[Subject],
Body,
[To],
[From],
MessageTypeID)
VALUES (@WorkFlowID,
@WorkFlowUserID,
@Subject,
@Body,
@UserID,
--Update the sender address to match the default one configured in Admin > Configuration > Parameters > Default Email Address
@EmailFrom,
-- Update the sender address to match the default one configured in Admin > Configuration > Parameters > Default Email Address
@MessageTypeID)
END
This way the system can fetch the data from the default e-mail address configured, and avoid having it hard-coded.
Could this be implemented in new releases as a permanent solution?
Thank you,
Kinga