Re: Issue With Email Scripts When Sending

John_Loftis
Level 2

Issue With Email Scripts When Sending

Hi,

I'm automating a series of emails that are sent to members of our organization before their expiration date. I've created two Email Script Tokens (see below) to help format dates on these emails based on a field we import into Marketo.

These both work fine when I preview in Marketo, i.e. I see the correct date populated by the token. However, when I send the sample the date appears as ${formattedDate} when the email is delivered.

Any suggestions on what I can do to fix this?

Email Scripts:

#set($myDate = $convert.parseDate(${lead.memberExpireDate}, 'MMM dd, yyyy'))

#set($formattedDate = $date.format('MMMM d', ${myDate}))

${formattedDate}

#set($myDate = $convert.parseDate(${lead.memberExpireDate}, 'MMM dd, yyyy'))

#set($formattedDate = $date.format('MMMM d, yyyy', ${myDate}))

${formattedDate}

1 REPLY 1
Phillip_Wild
Level 10 - Community Advisor

Re: Issue With Email Scripts When Sending

Hi John

I'm guessing you have already tried this - but can you confirm that the lead you are previewing the email as is the same lead you are using when deploying the email? I'm guessing that if the "lead.memberExpireDate" value is blank simply the variable name will be displayed to you.