Block is opening with
%[ and needs to be
%%[ for correct syntax. Outside that, I would make sure to be utilizing the HTML block type.
I also highly recommend using
ContentBlockByID() instead of ContentBlockByName() as no matter where you move the block or what you rename it, you won't need to go in and change all of the references inside of your emails/webpages.
SET @FromName = ''
SET @FromEmailAddress = ''
SET @rowsSA = LookupRows('DynamicSender','RepName', RepName)
SET @rowCountSA = rowcount(@rowsSA)
IF @rowCountSA > 0 then
SET @PrefSA = row(@rowsSA,1)
SET @FromNameA = Concat(Field(@PrefSA, 'SenderFirstName'),' ',Field(@PrefSA, 'SenderLastName'))
SET @FromEmailAddressA = Field(@PrefSA, 'Email')
IF ( @FromNameA != '' AND @FromEmailAddressA != '')
SET @FromName = @FromNameA
SET @FromEmailAddress = @FromEmailAddressA
SET @FromName = 'Default Sender'
SET @FromEmailAddress = '[email protected]'