• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

configuring JavaMail with Sendmail

 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic