Can't send mail to outside company

I wrote a javamail program, I can only send mail to internal email address, but not to outside, any reason that could be?Thanks for your help.Dan.
[174 byte] By [dnguyen2] at [2007-9-26 2:50:00]
# 1

On our system the servlet was running on one machine and the email server was on a different box. The Network Admin was able to make some setting changes on Exchange that allowed me to email outside our domain. So if you have the same problem that I did, your code is correct it is just you network settings need to be changed.

Aaron

adwillia at 2007-6-29 10:36:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

There are two ways to fix this :

1. Your must set up the mail server to allow mail relaying from the IP address where the javamail program is running.

2. If the program will not always run from the same address, you can setup the mail server to allow mail relaying for authenticated sessions. (Note that Sun's JavaMail implementation presently only supports the authentication mechanism LOGIN, that the mail server will have to support too)

Mail relaying : the ability for an SMTP server to act as an SMTP client with a foreign SMTP server - thereby passing the mail outside it's own domain.

bku1 at 2007-6-29 10:36:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
What is the JavaMail API doing differently an email program like MS Outlook would do? I'm having the same problem and am wondering why Groupwise can send outside email (haven't checked Outlook yet), but my java app gets the "No Mail Relay" error.
turingcomplete at 2007-6-29 10:36:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
MS Outlook is authenticating itself with the server. Your program probably isn't. You do have to sign on to your e-mail client, don't you?
DrClap at 2007-6-29 10:36:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5

I'm replying specifically for GroupWise but MS Outlook/Exchange will in essence be the same.

When you send an email from your PC using GroupWise, the GWIA (ie the SMTP server) is what actually sends the email. This is on a server somewhere but NOT on your PC.

When using Javamail, you are really operating another smtp client. The GroupWise GWIA is likely configured not to accept relaying. If it is, for example if you use a mail filtering system so relay all mail, it is likely configured to accept relaying from only that IP address. Your PC (or wherever you are running the Javamail from) is unlikely to be an 'allowed' relay source.

In GroupWise you can add as many relay sources as you like under the GWIA object. Again, Is imaging Exchange is similar.

Nick.

nickduddy at 2007-6-29 10:36:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...