I am trying to implement a dynamic sender profile. I have followed instructions from answers on similar questions on stack exchange. From what I understood this should work. However, every time I do a test send the email in my inbox shows a blank from name and from address. I would be much appreciated if someone could tell me what I am doing wrong.
I did the following:
- Created a DE called "Dynamic_Sender_Profiles" with 3 attributes: "Locale", "SenderName" and "SenderEmail"
Sendable data extensions that contain subscribers also have a "Locale" attribute.
Created a HTML content block (CustomerKey = DynamicSenderProfile) with the following AMPscript:
%%[ Var @fromname, @fromaddress, @locale, @row, @rows, @rowcount SET @locale = AttributeValue("Locale") SET @rows = LookupRows("ENT.Dynamic_Sender_Profiles", "Locale", @locale) SET @rowCount = rowcount(@rows) IF @rowCount > 0 then SET @row = row(@rows,1) SET @fromname = field(@row,"SenderName") SET @fromaddress = field(@row,"SenderEmail") ENDIF ]%%
I've tested the AMPscript by itself by implementing the AMPScript block and the %%=v(@fromname)=%% and %%=v(@fromaddress)=%% in the template of random email. In preview mode it showed me the correct values.
- I created a sender profile with the following from name and from email: