Troubleshooting SMTP Authentication Issue in Java Mail Send Function

14 Views Asked by At

I want to use javamailsender in my project.I added everything to properties and I configured everything on the gmail side.On another computer and in another project, emails are sent using this Gmail, but for me it crashes into an error when trying to send an email.Because of this, I do not associate the error with the mail settings.However, I can't understand why it falls into this type of error. Who had any help?

It falls into the catch error (InvocationTargetException var9) your text

@Nullable
protected Object doInvoke(Object args) throws Exception {
    Method method = this.getBridgedMethod();

    try {
        if (KotlinDetector.isKotlinReflectPresent()) {
            if (KotlinDetector.isSuspendingFunction(method)) {
                return this.invokeSuspendingFunction(method, this.getBean(), args);
            }

            if (KotlinDetector.isKotlinType(method.getDeclaringClass())) {
                return InvocableHandlerMethod.KotlinDelegate.invokeFunction(method, this.getBean(), args);
            }
        }

        return method.invoke(this.getBean(), args);
    } catch (IllegalArgumentException var8) {
        this.assertTargetBean(method, this.getBean(), args);
        String text = var8.getMessage() != null && !(var8.getCause() instanceof NullPointerException) ? var8.getMessage() : "Illegal argument";
        throw new IllegalStateException(this.formatInvokeError(text, args), var8);
    } catch (InvocationTargetException var9) {
        Throwable targetException = var9.getCause();
        if (targetException instanceof RuntimeException runtimeException) {
            throw runtimeException;
        } else if (targetException instanceof Error error) {
            throw error;
        } else if (targetException instanceof Exception exception) {
            throw exception;
        } else {
            throw new IllegalStateException(this.formatInvokeError("Invocation failure", args), targetException);
        }
    }
}
0

There are 0 best solutions below