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')
ENDIF
IF ( @FromNameA != '' AND @FromEmailAddressA != '')
THEN
SET @FromName = @FromNameA
SET @FromEmailAddress = @FromEmailAddressA
ELSE
SET @FromName = 'Default Sender'
SET @FromEmailAddress = '[email protected]'
ENDIF
]%%
%%%%
characters next to each other?%[
and needs to be%%[
. Outside that, I would try using the HTML block type, not textThere is a Free Text content block created with the following script