I migrated to a new server and have the exact settings as on the old server. On the new server, I press test and save for mail() and get a message, that the test email was sent successfully, but I never receive it. Cron job is running. Logs are de-activated and when I activate it temporarily I can see the test email message in the log. I also tested smtp with a few stmp servers like google mail and domain factory but failed (no success message). I prefer to stay with mail(), but I don't know what could be wrong. Any hints how to proceed from here? civicrm 5.38 and wordpress. mysql 8 and php 7.4
-
In the scheduler log I have following message: maybe this is releated... Entität: Job Aktion: process_mailing Summary Finished execution of Mailings scheduler with result: Fehler, Error message: API permission check failed for Group/get call; insufficient permission: require access CiviCRM Details Parameters parsed (and passed to API method): a:1:{s:7:"version";i:3;} Full message: Finished execution of Mailings scheduler with result: Fehler, Error message: API permission check failed for Group/get call; insufficient permission: require access CiviCRM– Mich___Jun 25, 2021 at 7:49
-
Yet if i log in with the cronuser which i specified as cronsuser, I get: Entität: Job Aktion: fetch_bounces Summary Finished execution of Bounces fetcher with result: Erfolg (1) Details Parameters parsed (and passed to API method): a:1:{s:7:"version";i:3;} Full message: Finished execution of Bounces fetcher with result: Erfolg (1)– Mich___Jun 25, 2021 at 8:09
-
It's easier to read if you edit your question and include the additional information there rather than put it in comments.– Aidan ♦Jun 25, 2021 at 10:02
1 Answer
The error message is about permissions so you need to check what user you are specifying in your cron command and check the permissions for that user. The required permissions are documented here.
Does it work if you manually run the scheduled job as an admin user? Go to Administer > System Settings > Scheduled Jobs
Find the 'Send Scheduled Mailings' job, click more
then Execute now
.
-
Thank you. In the crontab I use cronuser, a user i created in wordpress with full admin rights. Therefore it should also have access to everything in civicrm. If I look at the crontab log, those cronjobs are visible every five minutes (but as of yet they don't yet trigger the civicrm jobs). When I use the same url (I use the cron http method) in the browser, it triggers all civicrm jobs (I see it on the times shown) but no mails are sent, and when I trigger them manually, they count as triggered, but no mails are sent.– Mich___Jun 25, 2021 at 15:31
-
I temporarily set up another cronjob via easycron.com, which is the only one working correctly now (that actually really triggers civicrm jobs every 5 minutes automatically, I see it on the times shown), but no emails sent.– Mich___Jun 25, 2021 at 15:31
-
Am I right that my first question, the question about mail() is somehow unrelated to cron, since a single email should work without a cronjob? I guess I have to solve this first. Why doesn't the test function of mail() not send any mail? The problem is that the documentation starts with: test mail() or smtp and then moves on, but there is not much info what to do when the simple mail() "test and save" option tells me that it succeeded but actually no email was sent. Thanks for any hint!– Mich___Jun 25, 2021 at 15:31
-
p.s. I created two crontabs, one with root and the other one with www-data. And within I use the user cronuser.– Mich___Jun 25, 2021 at 15:32
-
Ok, forget the cron stuff until you get the test mail working. Check through docs.civicrm.org/sysadmin/en/latest/setup/civimail See if anything else is logged in the log files. Is this your own server build or hosted?– Aidan ♦Jun 25, 2021 at 18:14