humanmade/aws-ses-wp-mail

Docs: explain how the WP-CLI integration works

Closed this issue · 9 comments

Nice work: plugin looks great, (even looks like it supports IAM profiles), but I can't figure out how to make the wp commands run.

I'll submit a PR for the README if someone can help me work out how to make the CLI go.

@simpsonjulian the wp command is http://wp-cli.org - not sure if that was your question? It's a very common WordPress tool in the World of WordPress.

Hey @joehoyle, sorry I didn't make that clear. I'm a happy WPCLI user, I just couldn't make the extended commands from your plugin go. Wasn't clear if it was user error, configuration problem or something else.

@simpsonjulian ah, first step would be to try wp s3-uploads verify do you see that? If there are no s3-uploads commands, it could be that you are running PHP 5.2?

Oops, wrong plugin! However, the PHP 5.2 comment still stands - do you see any of the ses commands in the wp commands list when running wp

Cool. I'm running HHVM 3.13.0, WPCLI 0.21.1, WP 4.4.2, and I just downloaded the plugin as a zipfile now. I can verify that the plugin is installed via WPCLI:

+------------------------------+----------+-----------+---------+
| name                         | status   | update    | version |
+------------------------------+----------+-----------+---------+
| aws-ses-wp-mail              | active   | none      | 0.0.1   |
+------------------------------+----------+-----------+---------+

WP-CLI doesn't seem to know about the commands that this plugin offers, however:

vagrant@vagrant-ubuntu-trusty-64:/var/www$ /vagrant/bin/wp aws-ses verify-sending-domain
Error: 'aws-ses' is not a registered wp command. See 'wp help'.

@simpsonjulian it could be that you haven't entered the AWS config secrets outlined in https://github.com/humanmade/aws-ses-wp-mail, specifically

define( 'AWS_SES_WP_MAIL_REGION', 'us-east-1' );
define( 'AWS_SES_WP_MAIL_KEY', '' );
define( 'AWS_SES_WP_MAIL_SECRET', '' );

I figured it out. As we use IAM in production, I needed to use a different config. Sorry, I missed the very first line of the plugin that checks for that (it was truncated when I viewed it in github).

Pull request submitted as promised. Thanks @joehoyle!

Great, thanks!

This should probably error rather than not register.