Answers.Body: <p>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 <a href="https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#choosing-a-cms-user" rel="nofollow noreferrer">here</a>.</p>
  <p>Does it work if you manually run the scheduled job as an admin user? Go to <code>Administer &gt; System Settings &gt; Scheduled Jobs</code> Find the 'Send Scheduled Mailings' job, click <code>more</code> then <code>Execute now</code>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-25T15:31:30.977Z
Answers.Text: 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.
Answers.UserDisplayName: Mich___
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-25T15:31:41.787Z
Answers.Text: 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.
Answers.UserDisplayName: Mich___
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-25T15:31:46.083Z
Answers.Text: 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!
Answers.UserDisplayName: Mich___
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-25T15:32:49.600Z
Answers.Text: p.s. I created two crontabs, one with root and the other one with www-data. And within I use the user cronuser.
Answers.UserDisplayName: Mich___
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-25T18:14:36.073Z
Answers.Text: Ok, forget the cron stuff until you get the test mail working. Check through https://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?
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-02T13:17:50.567Z
Answers.Text: I got the civimail test working by switching to an new smtp service instead of mail(). Now i am back trying to get the cron job working. If I use easycron.com it works, but in the end I want to use the crontab option on my own server. If I check the cron status in the terminal, i get.
   cron.service - Regular background program processing daemon
     Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2021-03-05 16:09:31 CET; 4 months 28 days ago
       Docs: man:cron(8)
   Main PID: 519 (cron)
      Tasks: 1 (limit: 9508)
Answers.UserDisplayName: Mich___
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-02T13:20:43.510Z
Answers.Text: Unfortunately the civicrm actions it should trigger remain untouched. And if i trigger them manually they work.
Answers.UserDisplayName: Mich___
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-02T14:24:02.823Z
Answers.Text: If I use the url including name password and number in the browser it works. 
  Also the session opening and closing seems to be how it should be. 
  Still looking into it. If I test a line like */1 * * * * touch /tmp/foobar123 it works and creates that file in tmp.
Answers.UserDisplayName: Mich___
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-03T08:08:26.167Z
Answers.Text: Sounds like you're making progress.  What command do you have in cron for the civi jobs?
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-06T09:53:02.637Z
Answers.Text: I get following error log, but i use a user with all permissions (wp admin user).
  
  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
Answers.UserDisplayName: Mich___
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-06T09:53:44.867Z
Answers.Text: It could be file permissions? But all folders leading to php.cron, incl. php. cron, habe 775 permissions.
Answers.UserDisplayName: Mich___
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-25T10:13:46.583Z
Answers.LastActivityDate: 2021-06-25T10:13:46.583Z
Answers.UserDisplayName: Aidan
Body: <p>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</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-25T07:49:32.177Z
Comments.Text: 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
Comments.UserDisplayName: Mich___
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-25T08:09:22.660Z
Comments.Text: 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)
Comments.UserDisplayName: Mich___
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-25T10:02:44.887Z
Comments.Text: It's easier to read if you edit your question and include the additional information there rather than put it in comments.
Comments.UserDisplayName: Aidan
Tags: <civimail>
Title: civicrm mail() success message but no email sent (log de-activated)
ThreadText: # civicrm mail() success message but no email sent (log de-activated)
  
  (Asked by: username_0 on 2021-06-25)
  
  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
  
  **Tags:** civimail
  
  > **Comments:**
  > **username_0**: 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  
  > **username_0**: 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)  
  > **username_1**: It's easier to read if you edit your question and include the additional information there rather than put it in comments.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-06-25. Score: 0
  
  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](https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#choosing-a-cms-user).
  
  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`.
  
  > **Comments:**
  > **username_0**: 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.  
  > **username_0**: 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.  
  > **username_0**: 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!  
  > **username_0**: p.s. I created two crontabs, one with root and the other one with www-data. And within I use the user cronuser.  
  > **username_1**: Ok, forget the cron stuff until you get the test mail working. Check through https://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?  
  > **username_0**: I got the civimail test working by switching to an new smtp service instead of mail(). Now i am back trying to get the cron job working. If I use easycron.com it works, but in the end I want to use the crontab option on my own server. If I check the cron status in the terminal, i get.  cron.service - Regular background program processing daemon    Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)    Active: active (running) since Fri 2021-03-05 16:09:31 CET; 4 months 28 days ago      Docs: man:cron(8)  Main PID: 519 (cron)     Tasks: 1 (limit: 9508)  
  > **username_0**: Unfortunately the civicrm actions it should trigger remain untouched. And if i trigger them manually they work.  
  > **username_0**: If I use the url including name password and number in the browser it works.  Also the session opening and closing seems to be how it should be.  Still looking into it. If I test a line like */1 * * * * touch /tmp/foobar123 it works and creates that file in tmp.  
  > **username_1**: Sounds like you're making progress.  What command do you have in cron for the civi jobs?  
  > **username_0**: I get following error log, but i use a user with all permissions (wp admin user).  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  
  > **username_0**: It could be file permissions? But all folders leading to php.cron, incl. php. cron, habe 775 permissions.  
  
  ---
  
  