mac mail not sending


I have two different macs. One is a Imac one is a mac pro. Both running 10.13.6. Both of course have the same mac mail version. 11.5. Suddenly five days ago I can't send e-mail from either computer. (Different e-mail addresses) I do receive just fine. When sending I now get the message "cannot connect to smtp server.
Please check settings. Calling my internet provider was a waste of my time. Can somebody help. Nothing changed with either computer as far as software.
You said different e-mail addresses... Are both for the same e-mail service provider?
Which email provider?

I wouldn't expect that your internet provider would offer much help, unless you are using whatever email setup that they might offer.

If you are using only your Mac's Mail app for your email, have you checked to make sure the SMTP server is correctly spelled, and is the correct server setting for whatever email service that you use? Those SMTP server settings are in Mail preferences/Accounts, then Server Settings, then click on Outgoing Mail Account selecting Edit SMTP Server List. You will see the entry boxes for your server settings.
The one that you need to verify is Host Name.
Your email provider (not necessarily the same as your internet provider) should have a support page that will show the correct setup for an email account, including the correct SMTP server address.
I don't have any idea why the settings might spontaneously change, but you do need to check to make sure your email settings are what the email system expects.
This happened to me not too long ago. I get some email via my domain host, not my internet provider, and he moved his SMTP services to a new machine. I was still hitting the old machine and was preparing to go ballistic about not getting warned ahead of time, when ...

Looking back at messages received from my host, I found warnings which I had ignored! My problem was cured by a sheepish look and RTFM. M for mail.
All I know in Mac OS in the Mail menu items should be Connection Doctor (I think it is in Menu item ‘Window’) and try the connection again and see exactly where it is failing to see if something changed!