Apple Mail will receive but not send email on new iMac, but works OK on older iphone and MacBook Air
I have 3 Apple devices: a 2018 MacBook Air, an iPhone 14 and a brand new iMac. I have the same email account on all 3 devices with identical login details (same servers, passwords, ports, etc.), and it all works fine on the MacBook Air and the iPhone, but with the new iMac I can only receive, but cannot send emails. I receive an error message which reads "Sending the message content to the server failed" or "The server response was: An error occurred when sending this message using the SMTP server "(null)", and offers a choice of server: .me.com and my usual email server. The connection doctor says the IMAP/SMTP accounts all login successfully, but whatever I do, the message remains unsent in the Outbox. I have tried deleting the account and re-setting it, and I've tried migrating my user account from the original to a Test account. No improvement. Any ideas?
iMac 24″, macOS 14.5