Hi,
What I learned and understood from AspNetZero is Host email setting will be handled all tenants and host email operations.
Is there anyway whether I can enable or reference the code to implement Per Tenant Email setting? Eg. <a href="mailto:TenantA=TA@tt.com">TenantA=TA@tt.com</a>,TenantB=TB@tt.com and <a href="mailto:Host=HT@tt.com">Host=HT@tt.com</a> something like this. :)
5 Answer(s)
-
0
@ultimatemm, you mean STMP settings, right ?
If so, you need to change SMTP settings scopes to Tenant, see <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Setting-Management#setting-scope">https://aspnetboilerplate.com/Pages/Doc ... ting-scope</a>.Should be something like this in GetSettingDefinitions method of AppSettingProvider.
context.Manager.GetSettingDefinition(EmailSettingNames.Smtp.UserName).Scopes = SettingScopes.Tenant;
You also need to do this for all EmailSettingNames.Smtp.* values.
You also need to create a SMTP settings tab on tenant settings page which should insert/update smtp settings for tenant scope. Then, when you try to retrieve SMTP settings, it will be retrieved just like you want.
-
0
I believe there is more, as backend needs to save into tenant storage. For example:
await SettingManager.ChangeSettingForTenantAsync(AbpSession.GetTenantId(),AppSettings.TenantManagement.BillingLegalName, input.LegalName);
vs
await SettingManager.ChangeSettingForApplicationAsync(EmailSettingNames.DefaultFromAddress, input.DefaultFromAddress);
sounds like a great feature to have
-
0
Thanks @vladsd.
You can always create feature requests by creating issues here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues">https://github.com/aspnetzero/aspnet-zero-core/issues</a>.
In that way, the team will easily consider your request and assign it to a milestone if necessary. -
0
I already did. There are a lot of good features in your framework that can be uncovered with a few lines of code.
-
0
thanks for your feedback