JAVA MAIL

C

cipher

I have learnt how to send mail via SMTP protocol and read mails via
POP3 protocol.
If you know how to read mails through SMTP itself, please let me know.
 
G

Gordon Beaton

I have learnt how to send mail via SMTP protocol and read mails via
POP3 protocol. If you know how to read mails through SMTP itself,
please let me know.

SMTP is for sending and receiving mail, not for reading it.

/gordon
 
D

Daniel Dyer

I have learnt how to send mail via SMTP protocol and read mails via
POP3 protocol.
If you know how to read mails through SMTP itself, please let me know.

You can't. SMTP is only for sending mail.

Dan.
 
C

cipher

then can you please tell me how to receive mails through SMTP.
I have a mail server that supports only SMTP, and i want to access and
read my mails through the JAVAMAIL API, how can i do this?
 
A

Alun Harford

cipher said:
then can you please tell me how to receive mails through SMTP.
I have a mail server that supports only SMTP, and i want to access and
read my mails through the JAVAMAIL API, how can i do this?

You can only send mail with SMTP.
You cannot recieve mail SMTP.

Alun Harford
 
G

Gordon Beaton

then can you please tell me how to receive mails through SMTP. I
have a mail server that supports only SMTP, and i want to access and
read my mails through the JAVAMAIL API, how can i do this?

Your SMTP server will store the mail it receives into recipient
mailboxes somewhere in the filesystem.

Either you have a shell account on the server (so you can log in and
read your mail directly from the mailbox files), or the mailbox must
be made available through POP or IMAP or similar MAIL READING protocol
in order for you to access it.

If this mail server is "yours" (as you claim), then you get to decide
how to make the mailboxes available. If someone else maintains the
server, then you will have to convince him or her to configure the
server to allow you to read mail through a suitable protocol.

/gordon
 
T

Tim Slattery

cipher said:
then can you please tell me how to receive mails through SMTP.
I have a mail server that supports only SMTP, and i want to access and
read my mails through the JAVAMAIL API, how can i do this?

An SMTP server runs all the time and receives email from other
machines via Simple Mail Transfer Protocol whenever the other servers
want or need to send them. It doesn't store messages so that a client
program can attach to it and download them at its convenience, that's
what POP3 and IMAP are for.
 
R

Roedy Green

then can you please tell me how to receive mails through SMTP.
I have a mail server that supports only SMTP, and i want to access and
read my mails through the JAVAMAIL API, how can i do this?

see http://mindprod.com/jgloss/javamail.html
it uses POP3 or imap or is it mapi (I can never remember which is
which).

Read the tutorials. The Javadoc is hopeless for orientation.

Also read the source code for the Resend class in the bulk emailer. It
is heavily commented and does most of the things you are likely to
want to do.

http://mindprod.com/products1.html#BULK
 
C

Chris Smith

Roedy Green said:
it uses POP3 or imap or is it mapi (I can never remember which is
which).

It's IMAP.

MAPI is a (now obsolete) API for client-side code to interact with the
message store in Microsoft Outlook. It is not a network protocol.

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
N

Nigel Wade

Alun said:
You can only send mail with SMTP.
You cannot recieve mail SMTP.

SMTP is used to both send and receive e-mail. If you are sending mail to another
SMTP process, it is receiving it. If you want to receive email you normally use
an SMTP process to do so.

You cannot, however, read your email using SMTP. For JavaMail you need an IMAP
or POP server which has access to the mailbox in which the SMTP process stores
the mail.
 
R

Roedy Green

If you want to receive email you normally use
an SMTP process to do so.

It might be clearer to say that as:
"If you want to receive email from the outside world to forward to
your clients in your role as an email server, you normally use
an SMTP process to do so."
 
C

cipher

Thanks to Gordon Beaton, Daniel Dyer, Alun Harford, Tim, Roedy Green,
Chris Smith and Nigel Wade for providing the replies. I persuaded my
Mail admin to
enable the POP3 protocol on the server. So currently struggling with it
:).
Thanks a lot guyz..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top