dev@glassfish.java.net

Re: Authentification to an smtp sever

From: Bill Shannon <bill.shannon_at_sun.com>
Date: Wed, 12 Dec 2007 10:54:01 -0800

NewJavaLearner wrote:
> Hi,
> -i've added username and passwd (i wrote it like that) .
> -I use smtp and not smtps
> -this is a part of the exception generated in the log file that concerns
> transport protocol
>
> Caused by: com.sun.mail.smtp.SMTPSendFailedException: 530
> <mail_at_domain.com>... MAIL requires AUTH

It doesn't sound like you've added the properties I referred you to.
In particular, you need the mail.smtp.starttls.enable property.

Note also that you can't set the password as a property. You need
to explicitly pass the password (and username) in the connect call.