roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Johnson (JIRA)" <>
Subject [jira] Updated: (ROL-1694) Email notification for comments in Glassfish does not work, but could be a general issue
Date Tue, 23 Dec 2008 19:58:20 GMT


David Johnson updated ROL-1694:

    Fix Version/s:     (was: 4.0.1)
                       (was: 4.1)

> Email notification for comments in Glassfish does not work, but could be a general issue
> ----------------------------------------------------------------------------------------
>                 Key: ROL-1694
>                 URL:
>             Project: Roller
>          Issue Type: Bug
>    Affects Versions: 4.0
>         Environment: Glassfish 9.1_01
>            Reporter: Stephan M├╝hlstrasser
>            Assignee: Roller Unassigned
> Setting up email notification for Roller 4.0 under GlassFish didn't work with the "mail.configurationType=properties"
configuration. The SMTP server of the hosting company requires SMTP authentication, and I
had specified "mail.username" and "mail.password" in the configuration. Nevertheless I always
received an javax.mail.AuthenticationFailedException exception.
> I believe the problem is in the following code in org/apache/roller/weblogger/util/
(starting at line 642):
> -------------------------------------------------------------------------------------
> Transport transport = mailProvider.getTransport();
>  // Try to send while there remain some potentially good addresses
> try { 
>     do {
>         // Avoid a loop if we are stuck
>         nAddresses = remainingAddresses.length;
>         try {
>             // Send to the list of remaining addresses, ignoring the addresses attached
to the message
>                 transport.send(message, remainingAddresses);
> -----------------------------------------------------------------------------------------------
> The call "transport.send(...)" calls the method "public static void send(Message msg,
Address[] addresses)". In the API documentation there is the following comment for "public
static void send(Message msg)" method that most likely applies to the other static "send"
method as well:
> "Note that send is a static method that creates and manages its own connection. Any connection
associated with any Transport instance used to invoke this method is ignored and not used.
This method should only be invoked using the form Transport.send(msg);, and should never be
invoked using an instance variable."
> This means that the username and password from the properties are ignored, and that is
the reason that the AuthenticationFailedException occurs.
> The solution is to use the non-static "transport.sendMessage(message, remainingAddresses);"
instead of the static "transport.send(message, remainingAddresses);". With that change email
notifications work in GlassFish. But I think this is a general issue and this probably affects
Roller also under any  other application server if SMTP authentication is necessary.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message