We have a multi-tenant application. Each tenant has a separate database though. Having trouble in sending mail while logging in with different tenant other than Default tenant. While scheduling mail/Background process it refers to host db. And getting error for sending mails. Shows that it takes Host connectionString for hangfire process. For creating mail and other records it takes Tenant Connectionstring. Having separate Hangfire tables for each client
how to distinguish jobs for different tenants so that we can send emails tenant-specific.
Thanks!
1 Answer(s)
-
0
In your Background job, you can switch to tenant context like this <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Abp-Session#overriding-current-session-values">http://aspnetboilerplate.com/Pages/Docu ... ion-values</a>