aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes configuring JavaMail with Sendmail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "configuring JavaMail with Sendmail" Watch "configuring JavaMail with Sendmail" New topic
Author

configuring JavaMail with Sendmail

Alan Shiers
Ranch Hand

Joined: Sep 24, 2003
Posts: 237
Hi there,

I create a simple standalone app that has the following method in it for sending emails:



This method works perfectly if the SMTPServerName is set for my ISP's smtp server. But since I have my own in-house server now which is running Linux, I thought to try and make use of its Sendmail server instead.

So, I need to know what I need to change in my method, if anything, in order to send out emails through Sendmail. For starters, I consulted a book I have on linux which explains how to configure Sendmail as a relay to send messages out. I made those changes and restarted Sendmail. So that end is set.

Since the server is part of my LAN on IP address: 192.168.2.119, In my client app (on a different Windows computer withing the LAN), I tried setting the SMTPServerName to the IP address of my server running Sendmail. Then proceeded to send myself an email. That didn't work. I know Sendmail is listening on port 25 so I tried 192.168.2.119:25 adding the port number, but that didn't work.

So, what is SMTPServerName supposed to be if I'm trying to connect to Sendmail to send out an email?

Is the method adequate for what I need it to do, or do I have to change it?

Alan
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42591
    
  65
That didn't work.

but that didn't work.

What do either of those remarks mean? What happened when you tried? Were there any error messages in the sendmail logs?


Ping & DNS - my free Android networking tools app
 
Don't get me started about those stupid light bulbs.
 
subject: configuring JavaMail with Sendmail