Utilizing exceptions to provide informative messages in response.
kriiv opened this issue · comments
Martin commented
Package has a good number of granular exceptions:
use SMTPValidateEmail\Exceptions\Exception;
use SMTPValidateEmail\Exceptions\Timeout as TimeoutException;
use SMTPValidateEmail\Exceptions\NoTimeout as NoTimeoutException;
use SMTPValidateEmail\Exceptions\NoConnection as NoConnectionException;
use SMTPValidateEmail\Exceptions\UnexpectedResponse as UnexpectedResponseException;
use SMTPValidateEmail\Exceptions\NoHelo as NoHeloException;
use SMTPValidateEmail\Exceptions\NoMailFrom as NoMailFromException;
use SMTPValidateEmail\Exceptions\NoResponse as NoResponseException;
use SMTPValidateEmail\Exceptions\SendFailed as SendFailedException;
Is there a way to utilize these exceptions to include information about the exact error that occurred and providing that as part of the $results
array response?
zytzagoo commented
I'm not sure what exactly you want to achieve, but you should be able to extend and override the class and do whatever you need/want?
If you run into some concrete/exact/specific issue(s) while extending/overriding, do report back!