Open Closed

How can I store email settings in database? #303


User avatar
0
alper created
Support Team Director

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


1 Answer(s)
  • User Avatar
    0
    alper created
    Support Team 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 v9.1.0-preview. Updated on December 05, 2024, 12:19