This has been fixed in the cumulative hotfix for EXM 9.0 Update-1
The problem is that the contact is never being identified during dispatch. This needs to happen in the ensureSessionContext pipeline.
Add the following pipeline processor
public class LoadEmailRenderSessionContact
{
public ContactRepositoryBase ContactRepository { get; set; }
public void Process(InitializeTrackerArgs args)
{
if (!ExmContext.IsRenderRequest || ExmContext.ContactIdentifier == null || ContactRepository == null)
{
return;
}
Contact contact = ContactRepository.LoadContact(ExmContext.ContactIdentifier.Source, ExmContext.ContactIdentifier.Identifier);
if (contact == null)
{
return;
}
args.Session.Contact = contact;
}
}
and add it to the ensureSessionContext pipeline:
<ensureSessionContext role:require="Standalone or ContentManagement or DedicatedDispatch or ContentDelivery">
<processor type="FooBar.LoadEmailRenderSessionContact, FooBar" x:before="processor[@type='Sitecore.Analytics.Pipelines.EnsureSessionContext.LoadContact, Sitecore.Analytics']" resolve="true">
<ContactRepository ref="contactRepository" />
</processor>
</ensureSessionContext>
Additionally, you should make sure that the tracker is enabled for the site as MVC personalization will otherwise not work i.e. set enableTracking="true" on the exm site e.g..
<site name="exm" enableTracking="true" inherits="shell" virtualFolder="/" physicalFolder="/" startItem="/none" cacheHtml="true" htmlCacheSize="50MB" />