Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

send mail from WinXP PC 1

Status
Not open for further replies.

SimonSellick

Programmer
Nov 3, 2003
305
GB
Hi,

I'm trying to use javamail to send an email to a local address from a logged-on PC running WinXP, but with no success.

Do I need to connect to the local mail server, or can I use the MS Exchange object - which is already logged on to the mail server - perhaps with a Class.forName(xxx) to return an ActiveX object? Or is there some other way that I should be using?

I need only to send messages, not receive them or even to make sure that they get delivered.

So far, I have downloaded the java activation and mail JAR files and a demo mail send program which I have adapted to use the local mail server. It fails always at the .connect method of the transport object, with the Exception:
Code:
javax.mail.MessagingException: Could not connect to SMTP host: gbbdy01z001, port: 25;

Any assistance would be welcomed.

Simon.
 
Does that PC have direct connection to the SMTP server?

Cheers,
Dian
 
Hi Dian,

You hit it first time - thank you. I thought that it had direct access, but the server was actually on the other side of a firewall and needed to have a channel opened for the Java host.

Regards,

Simon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top