• Resolved tvojamami

    (@jenkoanze)


    Hello,

    I am trying to optimize the process of setting up SMTP auth on WordPress sites with using WP CLI tool.

    Everything works perfect, the only issue I have is when passing the password value to the plugin.
    No matter the environment, plugins, versions, etc. The password I provide via WP CLI isn’t working.
    100% I’m passing the password value incorrectly and I would like to know, how to correctly pass the value.

    The commands that I run are below:

    wp plugin install smtp-mailer --activate &&
    wp option update smtp_mailer_options --format=json '{"smtp_host": "<hostname>","smtp_port": "465","type_of_encryption": "ssl","smtp_auth": true,"smtp_username": "<email>","smtp_password": "<password>","from_email": "<email>","from_name": "<email>"}'

    So, everything is passed perfectly, only passing “smtp_password”: “<password>” attribute doesn’t work.
    Everytime I have to go to administration and manually paste the password and save the changes.

Viewing 1 replies (of 1 total)
  • Thread Starter tvojamami

    (@jenkoanze)

    Forgot to add: I don’t get any error when running the command. They execute without issue it’s just that something happens with the password value.
    Is it possible that passing the value, the plugin takes it as hashed not in plain text?

Viewing 1 replies (of 1 total)

The topic ‘WP CLI issue passing the password’ is closed to new replies.