Hi All.
wondering if anyone has successfully got mail destinations to read from a tenant in a multi-tenant application.
In my tests - the
InitialContext ctx = new InitialContext();
Session mailSession = (Session) ctx.lookup("java:comp/env/mail/" + mailAccount);
code always picks up the destination from the provider account and not the tenant account (I'm guessing because the context is the provider account content.)
Is there a simple way (which I'm missing) to get the mail session from the tenant - it doesn't seem like there is a nice method (as for the connectivity config utils to pick up the tenant config.
Or is there?
Cheers,
Chris