Portal for Support Agents

How to create a dynamic email signature with SQL source

The purpose of this article is to show how you can make an email signature with the integration module.

The use case is that if you don't want the title to appear and you let users themselves decide this, then the signature will format accordingly.

The SQL backend preparations

SELECT  FirstName, 
LastName, 
Initials, 
dbo.fTitle(Title, b1) AS Stilling, 
Company, 
Office, 
MobileNumber, 
b1
FROM   dbo.Users

ALTER FUNCTION [dbo].[fTitle]
(
@title nvarchar(50),
@title_yes_no bit
)
RETURNS nvarchar(50)
AS
BEGIN
DECLARE @str nvarchar(50)
SET @str = @title
IF @title_yes_no = 0
BEGIN
SET @str = ''
END
ELSE
SET @str =  '<b>' + @title + '</b><br>'
RETURN @str
END

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.