You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by exabrial <ex...@gmail.com> on 2012/09/03 20:23:38 UTC
JavaMail API won't send message... says I didn't supply
authentication information, but I did!
Guys, I have the following:
@Resource(name="mail/blogMail")
Session mailSession;
....
Transport transport = mailSession.getTransport("smtps");
try {
transport.connect();
transport.sendMessage(msg, new Address[] { new
InternetAddress(adminEmailAddress) });
} finally {
transport.close();
}
Here's the resource configuration:
<Resource id="mail/blogMail" type="javax.mail.Session">
mail.transport.protocol=smtps
mail.smtps.host=smtp.gmail.com
mail.smtps.auth=true
mail.smtps.user=xxxx@gmail.com
mail.smtps.password=xxxx
mail.smtps.ssl.enable=true
mail.debug=true
</Resource>
No matter what I do, I get the following error:
Loading javamail.default.providers from
jar:file:/Users/exabrial/dev/apache-tomee-webprofile-1.0.0/lib/geronimo-javamail_1.4_mail-1.8.2.jar!/META-INF/javamail.default.providers
DEBUG: loading new provider protocol=smtp,
className=org.apache.geronimo.javamail.transport.smtp.SMTPTransport,
vendor=Apache Software Foundation, version=1.0
DEBUG: loading new provider protocol=smtps,
className=org.apache.geronimo.javamail.transport.smtp.SMTPSTransport,
vendor=Apache Software Foundation, version=1.0
DEBUG: loading new provider protocol=nntp-post,
className=org.apache.geronimo.javamail.transport.nntp.NNTPTransport,
vendor=Apache Software Foundation, version=1.0
DEBUG: loading new provider protocol=nntp-posts,
className=org.apache.geronimo.javamail.transport.nntp.NNTPSSLTransport,
vendor=Apache Software Foundation, version=1.0
DEBUG: loading new provider protocol=nntp,
className=org.apache.geronimo.javamail.store.nntp.NNTPStore, vendor=Apache
Software Foundation, version=1.0
DEBUG: loading new provider protocol=nntps,
className=org.apache.geronimo.javamail.store.nntp.NNTPSSLStore,
vendor=Apache Software Foundation, version=1.0
DEBUG: loading new provider protocol=pop3,
className=org.apache.geronimo.javamail.store.pop3.POP3Store, vendor=Apache
Software Foundation, version=1.0
DEBUG: loading new provider protocol=pop3s,
className=org.apache.geronimo.javamail.store.pop3.POP3SSLStore,
vendor=Apache Software Foundation, version=1.0
DEBUG: loading new provider protocol=imap,
className=org.apache.geronimo.javamail.store.imap.IMAPStore, vendor=Apache
Software Foundation, version=1.0
DEBUG: loading new provider protocol=imaps,
className=org.apache.geronimo.javamail.store.imap.IMAPSSLStore,
vendor=Apache Software Foundation, version=1.0
DEBUG: getProvider() returning provider protocol=smtps;
type=javax.mail.Provider$Type@7dc99fa6;
class=org.apache.geronimo.javamail.transport.smtp.SMTPSTransport;
vendor=Apache Software Foundation;version=1.0
smtps DEBUG: Failing connection for missing authentication information
smtps DEBUG: Failing connection for missing authentication information
WARN com.beyondvital.authentication.NotificationBean - sendContactEmail()
ecountered exception
javax.mail.AuthenticationFailedException: null
at javax.mail.Service.connect(Service.java:280)
~[geronimo-javamail_1.4_mail-1.8.2.jar:1.8.2]
at javax.mail.Service.connect(Service.java:91)
~[geronimo-javamail_1.4_mail-1.8.2.jar:1.8.2]
at javax.mail.Service.connect(Service.java:76)
~[geronimo-javamail_1.4_mail-1.8.2.jar:1.8.2]
at
com.beyondvital.authentication.NotificationBean.send(NotificationBean.java:81)
~[NotificationBean.class:na]
Anyone know what is wrong?
--
View this message in context: http://openejb.979440.n4.nabble.com/JavaMail-API-won-t-send-message-says-I-didn-t-supply-authentication-information-but-I-did-tp4657255.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: JavaMail API won't send message... says I didn't supply
authentication information, but I did!
Posted by exabrial <ex...@gmail.com>.
Thank! I'm going to run local postfix for now, but I appreciate you digging
that up
--
View this message in context: http://openejb.979440.n4.nabble.com/JavaMail-API-won-t-send-message-says-I-didn-t-supply-authentication-information-but-I-did-tp4657255p4657273.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: JavaMail API won't send message... says I didn't supply authentication
information, but I did!
Posted by Bertrand Guay-Paquet <be...@step.polymtl.ca>.
And here it is :
http://openejb.979440.n4.nabble.com/javax-mail-Session-resource-and-smtp-authentication-td4322915.html
On 03/09/2012 4:50 PM, Romain Manni-Bucau wrote:
> Oki,
>
> On the list there was a workaround (using a postconstruct) for the 1.0.0 to
> use auth.
> Le 3 sept. 2012 22:47, "exabrial" <ex...@gmail.com> a écrit :
>
>> Ok, I found another way. I enabled postfix locally and that seems to be
>> working just peachy.
>>
>>
>>
>> --
>> View this message in context:
>> http://openejb.979440.n4.nabble.com/JavaMail-API-won-t-send-message-says-I-didn-t-supply-authentication-information-but-I-did-tp4657255p4657265.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
Re: JavaMail API won't send message... says I didn't supply
authentication information, but I did!
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Oki,
On the list there was a workaround (using a postconstruct) for the 1.0.0 to
use auth.
Le 3 sept. 2012 22:47, "exabrial" <ex...@gmail.com> a écrit :
> Ok, I found another way. I enabled postfix locally and that seems to be
> working just peachy.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/JavaMail-API-won-t-send-message-says-I-didn-t-supply-authentication-information-but-I-did-tp4657255p4657265.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: JavaMail API won't send message... says I didn't supply
authentication information, but I did!
Posted by exabrial <ex...@gmail.com>.
Ok, I found another way. I enabled postfix locally and that seems to be
working just peachy.
--
View this message in context: http://openejb.979440.n4.nabble.com/JavaMail-API-won-t-send-message-says-I-didn-t-supply-authentication-information-but-I-did-tp4657255p4657265.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: JavaMail API won't send message... says I didn't supply
authentication information, but I did!
Posted by exabrial <ex...@gmail.com>.
No, i've been using 1.0.0. I'll give it a try
--
View this message in context: http://openejb.979440.n4.nabble.com/JavaMail-API-won-t-send-message-says-I-didn-t-supply-authentication-information-but-I-did-tp4657255p4657263.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: JavaMail API won't send message... says I didn't supply
authentication information, but I did!
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Do you use the today snapshot?
Here is the factory
http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/MailSessionFactory.java(updated
this morning to manage auth)
Le 3 sept. 2012 21:33, "exabrial" <ex...@gmail.com> a écrit :
> I tried this config:
>
> mail.debug=true
> mail.smtp.host=smtp.gmail.com
> mail.smtp.port=465
> mail.smtp.auth=true
> mail.user=xxx@gmail.com
> password=xxx
> mail.smtp.ssl.enable=true
>
> and this:
>
> mail.debug=true
> mail.smtp.host=smtp.gmail.com
> mail.smtp.port=465
> mail.smtp.auth=true
> mail.smtp.user=xxx@gmail.com
> password=xxx
> mail.smtp.ssl.enable=true
>
> same error :(
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/JavaMail-API-won-t-send-message-says-I-didn-t-supply-authentication-information-but-I-did-tp4657255p4657261.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: JavaMail API won't send message... says I didn't supply
authentication information, but I did!
Posted by exabrial <ex...@gmail.com>.
I tried this config:
mail.debug=true
mail.smtp.host=smtp.gmail.com
mail.smtp.port=465
mail.smtp.auth=true
mail.user=xxx@gmail.com
password=xxx
mail.smtp.ssl.enable=true
and this:
mail.debug=true
mail.smtp.host=smtp.gmail.com
mail.smtp.port=465
mail.smtp.auth=true
mail.smtp.user=xxx@gmail.com
password=xxx
mail.smtp.ssl.enable=true
same error :(
--
View this message in context: http://openejb.979440.n4.nabble.com/JavaMail-API-won-t-send-message-says-I-didn-t-supply-authentication-information-but-I-did-tp4657255p4657261.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: JavaMail API won't send message... says I didn't supply
authentication information, but I did!
Posted by Romain Manni-Bucau <rm...@gmail.com>.
mail.user to specify the user (or mail.smtp.user)?
Le 3 sept. 2012 21:22, "exabrial" <ex...@gmail.com> a écrit :
> Same problem :(
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/JavaMail-API-won-t-send-message-says-I-didn-t-supply-authentication-information-but-I-did-tp4657255p4657259.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: JavaMail API won't send message... says I didn't supply
authentication information, but I did!
Posted by exabrial <ex...@gmail.com>.
Same problem :(
--
View this message in context: http://openejb.979440.n4.nabble.com/JavaMail-API-won-t-send-message-says-I-didn-t-supply-authentication-information-but-I-did-tp4657255p4657259.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: JavaMail API won't send message... says I didn't supply
authentication information, but I did!
Posted by Romain Manni-Bucau <rm...@gmail.com>.
I'd try password with no prefix
Le 3 sept. 2012 20:34, "exabrial" <ex...@gmail.com> a écrit :
> I also tried: Transport.send(msg); same result
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/JavaMail-API-won-t-send-message-says-I-didn-t-supply-authentication-information-but-I-did-tp4657255p4657256.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: JavaMail API won't send message... says I didn't supply
authentication information, but I did!
Posted by exabrial <ex...@gmail.com>.
I also tried: Transport.send(msg); same result
--
View this message in context: http://openejb.979440.n4.nabble.com/JavaMail-API-won-t-send-message-says-I-didn-t-supply-authentication-information-but-I-did-tp4657255p4657256.html
Sent from the OpenEJB User mailing list archive at Nabble.com.