Javamail offline mode

I am new to Javamail and I would like to ask the following question:

I wrote a program through which a new mail is sent to a gmail account.

It was successfull. Does this has to do anything with the fact that I was connected to a local network?

I mean if I had no access to the Internet this correct program would be able to send this message?

Thank you...

[387 byte] By [juanitaJa] at [2007-11-26 13:55:35]
# 1

> Does this has to do anything with the fact that I was connected to a local network?

Yes of course it does. You were able to send a mail to your gmail - it means that your local network had a Mail Transfer Agent (on your gateway probably)

The program which you have written is a Mail User Agent, whose only job is to send your mail to MTA. It is the MTA that relays your mail to the gmail server.

If you had no access to the internet, your mail will go as far as the MTA but no further.

You can create user accounts on your MTA and have messages sent/received between them. Its a sort of local email system. But the messages cannot pass to users whose accounts are not on your MTA

chaitunva at 2007-7-8 1:34:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

JavaMail needs a connection to a mail server in order to send the

message. If you want to operate in a mode where messages are

queued while offline to be sent later when online, you'll either have

to implement that in your application, or you'll need to run a mail

server (MTA) on your (e.g.) laptop that can accept the message

from JavaMail, queue it, and send it later when online.

bshannona at 2007-7-8 1:34:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Thank you very much
juanitaJa at 2007-7-8 1:34:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...