Thank you for reaching out to us. I have submitted a message to the developers to investigate further your issue.
Kind regards.
Looks like the email “Subject” field’s value may have some incorrect formatting. So it’s creating this notice in PHP 8 (PHP 7 was ignoring it).
What is the subject line of the email in question? The email that produces that notice.
It was the To: field that had the array.
I changed this line:
$line = sprintf(
‘Headers: %s, To: %s, Subject: %s’,
! empty( $args[‘headers’] && is_array( $args[‘headers’] ) ) ? implode( ‘ | ‘, $args[‘headers’] ) : ”,
! empty( $args[‘to’] ) : ”,
! empty( $args[‘subject’] ) ? $args[‘subject’] : ”
);
To this:
$line = sprintf(
‘Headers: %s, To: %s, Subject: %s’,
! empty( $args[‘headers’] && is_array( $args[‘headers’] ) ) ? implode( ‘ | ‘, $args[‘headers’] ) : ”,
! empty( $args[‘to’] && is_array( $args[‘to’] ) ) ? implode( ‘ ; ‘, $args[‘to’] ) : ”,
! empty( $args[‘subject’] ) ? $args[‘subject’] : ”
);
And the Warning no longer occurs.
Thank you.
That looks good but it doesn’t cover one scenario where the “to” field is not an array.
I have made a change to the plugin that should handle this. Please download the following copy of the plugin and test it out.
https://wp-ecommerce.net/wp-content/uploads/plugin-downloads/easy-wp-smtp.zip
Let me know how that goes.
Works just perfect. Thank you.