[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Classpathx-javamail] sending emails with authentication
From: |
Chris Burdess |
Subject: |
Re: [Classpathx-javamail] sending emails with authentication |
Date: |
Mon, 27 Sep 2010 15:39:20 +0100 |
Daniel Rindt wrote:
> thanks for your efforts. This example is connecting via imaps to the
> mailserver properly seems. But covers not my use case, i want sending a
> email.
> So i add a line like this:
> === 8< ===
> Transport transport = session.getTransport(url);
> === 8< ===
> I couldn't use imaps i got an exeption that no Provider is available
> for. So i use just imap for testing. But when i wan't the transport
> object it told me:
> === 8< ===
> javax.mail.NoSuchProviderException: invalid provider
> === 8< ===
>
> So i would like to ask you if you can provide please a working example
> for sending emails with that server? Thanks.
IMAP is only a mail retrieval protocol, you cannot get a transport for this
provider. You need a transport protocol like SMTP:
Transport transport = session.getTransport("smtp");
For how to send a message, see the testSendMessage method of
test/src/TransportTest.java in the GNUMail distribution.
--
Chris Burdess
- [Classpathx-javamail] sending emails with authentication, Daniel Rindt, 2010/09/14
- Re: [Classpathx-javamail] sending emails with authentication, Chris Burdess, 2010/09/14
- Message not available
- Re: [Classpathx-javamail] sending emails with authentication, Chris Burdess, 2010/09/14
- Re: [Classpathx-javamail] sending emails with authentication, Daniel Rindt, 2010/09/15
- Re: [Classpathx-javamail] sending emails with authentication, Chris Burdess, 2010/09/16
- Re: [Classpathx-javamail] sending emails with authentication, Daniel Rindt, 2010/09/18
- Re: [Classpathx-javamail] sending emails with authentication, Chris Burdess, 2010/09/20
- Re: [Classpathx-javamail] sending emails with authentication, Daniel Rindt, 2010/09/20
- Re: [Classpathx-javamail] sending emails with authentication, Chris Burdess, 2010/09/21
- Re: [Classpathx-javamail] sending emails with authentication, Daniel Rindt, 2010/09/21
- Message not available
- Message not available
- Message not available
- Re: [Classpathx-javamail] sending emails with authentication,
Chris Burdess <=
- Re: [Classpathx-javamail] sending emails with authentication, Daniel Rindt, 2010/09/27