2

I am trying to set a different reply-to email for each country. I found out that I should use the lookup function in this case so I must insert in the “From Email” field in the custom reply email address the following code:

 %%=Lookup("ReplyInformation","ReplyEmailAddress","CountryCode", "GB")=%%

But I tried to replace the value "GB” by a variable by using the Set function in order to define the countrycode variable (because inserting “GB” is the same like inserting the reply-to email for the clients from GB, so it doesn’t make sense for me), but it didn't work.

%%[SET @countrycode = countrycode]%%
%%=Lookup("ReplyInformation","ReplyEmailAddress","CountryCode", countrycode)=%%

Furthermore I should use only Data Extension fields in the lookup function, not profile/preference center's attributes. Do you have any suggestions regarding this matter?

1 Answer 1

6

The recipient is replying to an email, so you can't use a context (for example a field in a sendable Data Extension used to send the original email). Remember that original the email has already been sent, and now someone is replying to the email. There are a few AMPscript personalization strings that can be used with RMM:

  • _RMM_Headers
  • _RMM_ReplyBodyText
  • _RMM_ReplyBodyHTML
  • _RMM_ReplySubject
  • _RMM_JobID
  • _RMM_ListID
  • _RMM_BatchID
  • _RMM_SubscriberID
  • _RMM_RecipientEmailAddress
  • _RMM_RecipientSubscriberKey

What you seem to want to do is to use the appropriate countrycode value based on the Subscriber. You could do this by looking up the country code for a recipient.

Assuming that you have a Data Extension named 'MyDataExtension' and this contains a 'countrycode' and 'SubscriberKey' field, then you can use something like this:

%%[
    var @countrycode, @replyemail
    set @countrycode = Lookup("MyDataExtension","countrycode","SubscriberKey", _RMM_RecipientSubscriberKey)
    set @replyemail = Lookup("ReplyInformation","ReplyEmailAddress","CountryCode", @countrycode)=%%
]%%%%=v(@replyemail)=%%

You can also use the first Lookup function (instead of MyDataExtension) to retrieve a Subscriber profile attribute by using _Subscribers as the Data Extension name.

1
  • Hi @Eliot, i configured your code in the Email Address field into the Custom Reply Mail Management, but it didn't work. I probably misunderstood where i should insert the code; do you confirm that is the correct place or i should insert it in the Sender Profile Address as explained here?
    – cmbob
    Commented Feb 3, 2017 at 13:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .