Hello, I am having difficulty with the PHP Swift Mailer class. For some reason it will randomly have a fatal error regarding a connection issue. I understand that the connection was lost and mail could not be sent, but does anyone know if its possible to suppress this fatal error from displaying and just continue whether mail was sent or not?
Here is the error it returns.
Fatal error: Uncaught Error of type [swift_connection_exception] with message [There was a problem reading line 1 of an SMTP response. The response so far was: . It appears the connection has died without saying goodbye to us! Too many emails in one go perhaps? (fsockopen: #0) ] @0 sitecustom::sendmessage() in /home/mydecisi/public_html/deleteHome.php on line 42 @1 swift::swift() in /home/site/public_html/classes/site.class.php on line 523 @2 swift::connect() in /home/site/public_html/swift/lib/Swift.php on line 109
in /home/site/public_html/swift/lib/Swift/Errors.php on line 99
This error seems to have been triggered from the script you are using itself. You can suppress it by turning down your error reporting, however you cannot proceed unless you check for the connection beforehand and handle that situation appropriately. I personally am not familiar with that class, so you might have to do some research.