commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Neidhart <>
Subject Re: [EMAIL] Using Apache Commons Email and Google
Date Thu, 10 Jul 2014 22:08:41 GMT
On 07/09/2014 02:57 AM, Jason wrote:
> Resurrecting this old post, I found that in order to Authenticate with SASL 
> using
> it was necessary to invoke 
>      Transport.send(this.message, this.getFromAddress().getAddress(), ""); 
> rather than
>      Transport.send(this.message);
> The attached patch does this.  The if condition may need to be tweaked to
> make it more specific to google-mail-oauth2.

Hi Jason,

thanks for the hint, but are you sure that this is working correctly?

Looking at the Transport.send(Message msg, Address[] addresses) javadoc,
it states the following:

  * Send the message to the specified addresses, ignoring any
  * recipients specified in the message itself.

Thus when calling it with the from address, it will only be sent to the
originator of the message and not to the actual recipients.

Furthermore, the code does not compile as there is no overloaded send
method which takes a String as third argument (and there is no implicit
conversion to an Address).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message