fluent-smtp icon indicating copy to clipboard operation
fluent-smtp copied to clipboard

Configure default connection by WP Cli?

Open cdsaenz opened this issue 1 year ago • 2 comments

I've been trying to setup a FluentSMTP default connection in my script to create a WP Default site, but didn't succeed. I've found that the option to update is fluentmail-settings, and that the value should be serialized but not sure what's failing. Have you tried to do this? Maybe there's some tip that you can give me to guide me on this task. Thanks!

cdsaenz avatar Jun 12 '24 23:06 cdsaenz

Hello. I am looking for the same solution. Any updates? Thanks!

iovcho avatar Mar 21 '25 15:03 iovcho

I don't have the code available now but what I did as far as I recall was to do an eval-file in WP CLI to a php file that: declares a variable $settings (with data read from an existing installation) and then doing an update_option on 'fluentmail-settings'. That creates the config. Moreover I declared define( 'FLUENTMAIL_SMTP_USERNAME'..) and define( 'FLUENTMAIL_SMTP_PASSWORD'..) in wp-config (using wp cli too) with the actual hardcoded user/password desired. Works but it's less than ideal.

cdsaenz avatar Mar 21 '25 16:03 cdsaenz