I'm trying to get outbound mail set up. With CiviCRM 5.70.1 on PHP8.1, if I configure it to send via mail() then the test message works successfully, but I can see that my transactional emails, a membership receipt email is the one i'm interested in, is getting sent but is malformed (it's like bits of the metadata in the email are missing, resulting in a badly messed up message that is barely readable). I've seen the same thing on a different install, and that was resolved by sending out via SMTP instead, and in that case I get good results by configuring the SMTP settings to use to 'localhost' as my SMTP server on port 25 with no authentication. That's on a server currently running on PHP 7.4 and slightly older version of CiviCRM.
Using the exact same settings on my 5.70.1 install, I get a fatal error. Looking in the logs I see in the CiviCRM log just this:
[error] not connected
and in my apache error log I see:
Got error 'PHP message: PHP Warning: Undefined property: CRM_Admin_Form_Setting_Smtp::$_id in /home/rp/sites/live/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php on line 2123
PHP message: PHP Warning: Undefined property: CRM_Admin_Form_Setting_Smtp::$_id in /wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php on line 2123
PHP message: PHP Warning: Undefined property: CRM_Admin_Form_Setting_Smtp::$_id in /wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php on line 2123
PHP message: PHP Warning: Undefined property: CRM_Admin_Form_Setting_Smtp::$_id in /wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php on line 2123
PHP message: PHP Warning: Undefined property: CRM_Admin_Form_Setting_Smtp::$_id in /wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php on line 2123
PHP message: PHP Fatal error: Uncaught Error: Call to undefined function fsockopen() in /wp-content/plugins/civicrm/civicrm/vendor/pear/net_socket/Net/Socket.php:165
Clearly CiviCRM is not happy with what I'm providing by way of settings. But it doesn't seem to matter what I put in the SMTP settings fields - I get the same fatal error regardless. Wondering if this is a bug in 5.70.1?