We have an old TYPO3 version 9. On this site, there is a form (with form framework). This form sends an email to the user, which submits the form.
To specific times, we experience a high traffic on that form --> about 2.000 mails within 2 - 3 hours.
This causes an exception in the frontend: Swift_TransportException: Too many messages from this host last hour
I'm not sure, where this limit is set and if it can be configured? Does SwiftMailer has a limitation somewhere? Or does it just react to the limits of the SMTP-server?
Too many messages from this host last hour
This error message is retrieved from the used mailing server (SMTP). That means, that the server admin / mail admin of that server controlls the limit how many mails are allowed to be send.
That's nothing you can configure in TYPO3 or for SwiftMail.
You should contact the provider where the used SMTP / Mailserver for sending the mails is hosted. Or the administrator in charge of your company.
Either increasing the limit.
Anouther solution would be to use a dedicated mailing provider for transactional mails, which comes with a price tag but can handle higher loads of sending emails. Do some recherce on that, there are some out there. (Probiding a SMTP passthrough).
Currently not sure about the old SwiftMail / TYPO3 v9 - but with newer version instead of SMTP Transport a "queued" transport could be configured. That means, that the form simply adds the mail into a local queue (database) and you need a cronjob to send them delayed later on - at best with a selected max count per iteration to stay under the server limit.
Further solution would go into the direction of implementing custom stuff your self.
Beside that, ~2k mails in ~2h (1k/h) is a number where most casual hosting provider set there limit lower for casual hosting options.
Revise your hosting (webserver / mailing ), talk with the support of your provider and switch to another plan.
Another option would be to revise if the form really needs to send emails. Maybe better save them to a database and let respoinsible people work with a list or something similar.
With that count, you should check if a spam bot is spamming your formular.