Title:

Hi, Douglas

Finally, it works :D

All that one should do(besides providing the authentication information) is to set this property to "true" before creating de Session object

because the Sun JavaMail transport implementation(com.sun.mail.smtp.SMTPTransport) is setting it to "false" by default:
Properties props = System.getProperties();

.....................................................................

props.put("mail.smtp.auth","true");
.............................................................

Session session = Session.getInstance(props, new MyAuthenticator());

Best,

Dragos
-----Urspr�ngliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im Auftrag von Douglas
Liu
Gesendet: Freitag, 7. September 2001 04:11
An: 'JBoss Mailing List'
Betreff: RE: [JBoss-user] SMTP with authentification


Dear Dragos

I think the useAuth flag is judged by the ehlo response from your smtp provider.
you might want to check it by issueing a telnet x.x.x.x 25 <\n> ehlo <your domain> <\n> for details.

I've experienced a situation that the smtp provider (Notes SMTP) identified itself as 250-AUTH=LOGIN
while this is not acceptable by the Sun JavaMail implementation and is identified as 'No auth is required'
when I consult the RFC document, the ehlo response should be AUTH LOGIN, no equal sign but a whitespace.

I didn't try to solve the problem but switch my smtp provider instead,
while I guess the solution might be to re-implement that part of JavaMail which is absolutely beyond the scope of my project.

hope this helps.
regards.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dragos Haiduc
Sent: Thursday, September 06, 2001 2:07 AM
To: JBoss Mailing List
Subject: [JBoss-user] SMTP with authentification


Hello

I created a very simple MDB which is taking over messages out of JBoss'
message queue(that's where the sender class is sending them), and is sending
them to the recipient.

My problem is that the SMTP server i am using is asking for userID/password
authentication. For handling this situation, i've made
an extension of the javax.mail.Authenticator.

Everything works just fine...when i am not using an SMTP server without
authentication.::))


Here is a copy of some messages from JBoss(version 2.2.2)

DEBUG: getProvider() returning
javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.s
mtp.SMTPTransport,Sun Microsystems, Inc]
[EmailMDB] DEBUG SMTP: useEhlo true, useAuth false

 as you see here, useAuth is "false".

Would there be a way to "let know" the Mail Provider that useAuth should be
set to "true"?
Maybe in a .properties file somewhere?

Otherwise the SMTP server will keep rejecting my requests.

Thanx in advance for all your help.
Dragos


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user$��--$����~z?�i���S�l�<�q���z��S�l�X��)ߣ�ۢ�.

Reply via email to