commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siegfried Goeschl <siegfried.goes...@it20one.at>
Subject Re: [email] Exchange Server Authentication / NTLM
Date Sun, 01 Aug 2010 09:39:39 GMT
Hi,

there seems to be support for NTLM authentication in javamail (which 
version are you using by the way?) but personally I have never used it 
with NTLM before.

I think the best is to have a look at the javamail API (there are a 
couple of NTLM related properties) and try to solve the connectivity on 
javamail API level. If that works please post your result so I can help 
with commons-email integration.

Cheers,

Siegfried Goeschl

On 01.08.10 09:12, Ferindo Middleton wrote:
> I'm trying to send email through an MS Exchange server that I have a user
> account on. My servlet connects to the server but is unable to authenticate
> using the login credentials I have on the server. My outlook email client
> says it's using Kerberos/NTLM authentication mechanism so I imagine that the
> servlet is failing to authenticate because it's not using NTLM
> authentication. I'm using commons-email-1.2. Is it possible to authenticate
> to exchange server using commons-email-1.2. I'm going to paste a snippet of
> my servlet code and debug info in Tomcat stdout_ log.
>
> servlet snippet below:
>
> HtmlEmail email = new HtmlEmail();
>    email.setHostName("xxxxxxxxxxx");
>    email.setAuthentication("xxxxxxxxxx", "xxxxxxxxxx");
>    email.setSmtpPort(25);
>    email.setTLS(true);
>
>   try {
>    // Create the email message
>    email.addTo("xxxxxxxxxxxx", "xxxxxxxxxxx");
>    ..... (other properties of the email message added here....)
>    email.send();
>
> stdout_ log messages below:
>
> DEBUG: getProvider() returning
> javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
> Microsystems, Inc]
> DEBUG SMTP: useEhlo true, useAuth true
> DEBUG SMTP: useEhlo true, useAuth true
> DEBUG SMTP: trying to connect to host "xxxxxxxxxxxx", port 25
>
> 220 xxxxxxxxxxxx Microsoft ESMTP MAIL Service ready at Sun, 1 Aug 2010
> 02:28:35 -0400
> DEBUG SMTP: connected to host
> "xxxxxxxxxxxx<http://aus2k3e7smbx002.us.usaid.gov/>",
> port: 25
> EHLO XXXXXXXXXXXXXX
> 250-xxxxxxxxxxxx Hello [165.13.128.8]
> 250-SIZE
> 250-PIPELINING
> 250-DSN
> 250-ENHANCEDSTATUSCODES
> 250-STARTTLS
> 250-X-ANONYMOUSTLS
> 250-AUTH NTLM
> 250-X-EXPS GSSAPI NTLM
> 250-8BITMIME
> 250-BINARYMIME
> 250-CHUNKING
> 250-XEXCH50
> 250 XRDST
> DEBUG SMTP: Found extension "SIZE", arg ""
> DEBUG SMTP: Found extension "PIPELINING", arg ""
> DEBUG SMTP: Found extension "DSN", arg ""
> DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
> DEBUG SMTP: Found extension "STARTTLS", arg ""
> DEBUG SMTP: Found extension "X-ANONYMOUSTLS", arg ""
> DEBUG SMTP: Found extension "AUTH", arg "NTLM"
> DEBUG SMTP: Found extension "X-EXPS", arg "GSSAPI NTLM"
> DEBUG SMTP: Found extension "8BITMIME", arg ""
> DEBUG SMTP: Found extension "BINARYMIME", arg ""
> DEBUG SMTP: Found extension "CHUNKING", arg ""
> DEBUG SMTP: Found extension "XEXCH50", arg ""
> DEBUG SMTP: Found extension "XRDST", arg ""
> DEBUG SMTP: Attempt to authenticate
> DEBUG SMTP: use8bit false
> MAIL FROM:<xxxxxxxxxxxx>
> 530 5.7.1 Client was not authenticated
> QUIT
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message