Hi Thufir,

James is an email server and can talk SMTP, IMAP, POP3. These are the
email protocols used on the internet.

Returning to Listing 4, the java client is configured with the host
that James runs on, and also the protocol to use (SMTP).
The protocol informs the client it must connect to port 25.  See [1]
and [2] for details and exact description of SMTP.

[1] http://en.wikipedia.org/wiki/Smtp
[2] http://tools.ietf.org/html/rfc5321

On Wed, Aug 15, 2012 at 6:16 AM, Thufir <[email protected]> wrote:
> I downloaded James 3, and, wow, there are many JAR's.
>
> Looking at:
>
> Listing 4. MailClient: Simulating the basic functionality of an e-mail client
>
> http://www.ibm.com/developerworks/java/library/j-james1/index.html
>
>
>
> I surely don't need all those JAR's in my classpath, do I?  I only need:
>
> import java.io.*;
> import java.util.*;
> import javax.mail.*;
> import javax.mail.internet.*;
>
>
> and then you make session:
>
> session = Session.getInstance(props, this);
>
>
> now, nowhere in any of that code do I see "connect to James".  How do
> you know that you're connecting to James and not something else?

Here is the code that configures java-mail client with James's
address, port and the user. POP3 and IMAP are for retrieval, SMTP is
for sending.
    props.put("mail.user", user);
    props.put("mail.host", host);
    props.put("mail.debug", debug ? "true" : "false");
    props.put("mail.store.protocol", "pop3");
    props.put("mail.transport.protocol", "smtp");

> Is James like Apache httpd where you need it always running as a
> service?  Or, can you maybe "start" (?) James from within MailClient?

You need to start and configure James. Please read James User Manual from [3]

[3] http://james.apache.org/server/3/quick-start.html

>
>
>
> thanks,
>
> Thufir
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Ioan Eugen Stan / CTO / http://axemblr.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to