打开 关闭

How can I store email settings in database? #303


User avatar
0
alper 创建
支持团队 Director

I want to write email settings to my database. How can I do that?


1 答案
  • User Avatar
    0
    alper 创建
    支持团队 Director

    You can write the email settings to the AbpSettings table.

    | Name | Value | Provider Name | |----------------------------------------|---------------------------|----------------| | Abp.Mailing.Smtp.EnableSsl | true | G | | Abp.Mailing.Smtp.Password | {encrypted password} | G | | Abp.Mailing.Smtp.Domain | | G | | Abp.Mailing.DefaultFromDisplayName | My Company | G | | Abp.Mailing.Smtp.UseDefaultCredentials | false | G | | Abp.Mailing.Smtp.Host | smtp-relay.sendinblue.com | G | | Abp.Mailing.Smtp.Port | 587 | G | | Abp.Mailing.Smtp.UserName | account@mymail.com | G |

    The password field is encrypted, therefore you need to write the password as encrypted.

    How to encrypt my email password? You can encrypt your email password with IStringEncryptionService

    Also see How-to-configure-email-settings

Made with ❤️ on ABP v8.2.0-preview Updated on 三月 25, 2024, 15:11