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
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