IBM Support

Outbound message results in javax.mail.AuthenticationFailedException

Technote (troubleshooting)


Sending outbound emails from WebSphere Commerce fails with an authentication failure.


You will see an exception similar to the following in the SystemOut.log file

1/24/13 10:40:00:531 PST] 000000a3 CommerceSrvr E JMSMessageBean
sendImmediate CMN9907E: A resource exception occurred during processing: "{0}". javax.resource.ResourceException: javax.resource.spi.ResourceAllocationException:
javax.resource.spi.CommException: The following exception has occurred: javax.mail.AuthenticationFailedException.


Caused by: javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(


Generally this error means that the user name or password configured for the transport or message type is not valid. In this case we will assume that the password is correct, but you should verify you are using the correct password first. If the password is correct, this can occur if the user name being passed is not a full user name.

Diagnosing the problem

If you enable WebSphere Commerce messaging traces (Messaging Traces), you will see the following in the trace.log file before the exception occurs:

[1/24/13 10:40:00:093 PST] 000000a3 jcaemail 3
JCAEmailConnectionRequestInfo JCAEmailConnectionRequestInfo() Email
server: password=********
user name=AdminUser

In this case, AdminUser is the user trying to authenticate to the mail server, but the mail server is expecting

Resolving the problem

Verify the User Name you have configured in the Message Type and email Transport configuration from the Commerce Administration Console. Start with the specific Message Type that is failing:

1. Navigate to Configuration > Message types > Message type name. You should see something similar to the following:

a. If no User Name is specified here, move on to step 2 because we will use the Transport configuration if nothing is specified for the Message Type

b. If a User Name is specified, ensure it is a full user name like this:

c. Save the configuration change and test again.

2. (Only if the Message type does not have a User Name specified) Navigate to Configuration > Transports > email and check your settings:

a. Verify that if you have a User Name specified and it is the full user name:

b. If the email transport is not using a full User Name, update it similar to the following:

Also, ensure the port is correct for your SMTP server. Some servers may use ports like 465 or 587 for secure email.

c. Save the change(s) and test again

Related information

Configuring outbound e-mail notification messages

Document information

More support for: WebSphere Commerce Enterprise

Software version: 7.0

Operating system(s): AIX, IBM i, Linux, Solaris, Windows

Software edition: All Editions

Reference #: 1624739

Modified date: 18 February 2015

Translate this page: