I'm trying to find out if authentication configurations are filled correctly. But I don't want to send message to catch AuthenticationFailedException(). How can I catch this exception without sending? I've got few fields:

  • mail
  • smtp
  • port
  • password

If they're incorrect, exception should be thrown.

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top