Hello! I am working on automating the installation of SuiteCRM in AWS. Currently I am trying to automatically configure outbound email settings to use AWS SES.
I am able to edit the Email Settings in the UI and get the email configuration to work, however, I would like to specify the email settings via a config file or other method which could be automated.
Is this possible?
Hi, welcome to the community!
There are a lot of email settings in SuiteCRM, I don’t know exactly which ones you mean.
But assuming you already looked to the most obvious places where the configuration could be stored, namely, database fields or PHP configuration files, I suggest you take a look at fields called stored_options (or something similar, I am writing from memory) in the inbound_email and outbound_email tables.
These fields are encoded as Base64 which you can decode easily, look online. Maybe you’ll find the configurations that interest you there.
I hope this solves your issue, if not, please give more details, including SuiteCRM version.
Hi! I’m referring to the configuration of the outbound SMTP server at this URL:
I’ve attached a screenshot of the fields I’m interested in updated programmatically.
I looked in the database and it seems that when I update these settings in the UI there are at least two tables that are updated - the ‘config’ table and the ‘outbound_email’ table. However, in the ‘outbound_email’ table there is a ‘mail_smtppass’ column which looks like it gets set to a hashed value of the password I entered into the UI. It isn’t just base64, so I’m assuming there is some password encryption going on here.
Given that I would like to use some API call or function call to set these values - do you know if it is possible?
Oh and I’m using SuiteCRM version 8.3.0
The password value stored in the DB is not a Base64 encoding, it’s a proper hash (MD5, I think). So that’s not what you’re looking for.
Isn’t there a “stored options” column somewhere in the database?
In v8 everything in the UI goes through the GraphQL API, so you should be able to set up that API and use the same endpoints. But there isn’t much documentation, I’m afraid.