5

Do you have a CiviCRM installation with bulk email working on the latest wordpress and CiviCRM 4.7.x, using a cron job set up in cPanel? I have been unable to get cli.php or wp-cli.php to work recently. The cron job fires without error but no email is sent. Cli.php with cron was working up to about 6 months ago or so, but we made the rookie mistake of upgrading CiviCRM... We would appreciate a step by step recipe to get this working again.

1 Answer 1

3

I found the problem. There was a breaking change in CiviCRM over the past year. We were just using the access CiviMail permission for the wordpress user used for sending bulk mail. But it turns out you now need 3 permissions. (I found this in a 3 year old forum posting.)

CiviCRM: view all contacts CiviCRM: access CiviCRM CiviMail: access CiviMail

Both of the following cron job commands work now. cli.php still works contrary to what I posted before -- and this is the easiest to use since you don't have to learn and install SSH or wp-cli.phar. Our wordpress system is on inexpensive shared hosting.

/usr/local/bin/php -d extension=phar.so /home/example/wp-cli.phar --user=CiviMailUser --url=http://example.org --path=/home/example/public_html civicrm process-mail-queue job.execute auth=0



/usr/local/bin/php -q /home/example/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php -j -s example.org -u CiviMailUser -p password -e Job -a process_mailing

Not the answer you're looking for? Browse other questions tagged or ask your own question.