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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JavaMail but no SMTP" Watch "JavaMail but no SMTP" New topic
Author

JavaMail but no SMTP

John Davis
Ranch Hand

Joined: Nov 02, 2000
Posts: 189
I'm developing a Java Swing app to monitor processes. When it detects a process outage, I want it to email the support group. This app runs on a corporate laptop in a LAN network environment. The mail server is Microsoft Exchange Server and the mail client is Microsoft Outlook. SMTP is not supported so my attempts at getting the JavaMail to work have failed. I tried installing Eudora Light in an attempt to configure it so that I could use GMAIL pop3/smtp but this attempt fails also because (I assume) the ports are blocked.
Question: Is there an API available whereby I can get this Java app to send an email in this environment?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

I'm going to guess that it is some peculuarity of your Exchange server that makes you say SMTP is not supported because Exchange itself does support SMTP.

You can use a different Transport implementation to send your emails to the server. JavaMail ships with SMTP and IMAP. Check the JavaMail home page for third party implementations of other protocols, there might be one for whichever protocol your Exchange server uses instead of SMTP. Unfortunately since SMTP is the overwhelming protocol of choice for sending mails these days you might struggle.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18657
    
    8

I don't think that there are any alternative mail transport protocols besides SMTP. I know it's Microsoft we're talking about but even so I don't think they have written their own mail transport protocol. So if you're having trouble connecting to Exchange and using SMTP, you should ask your network support people to help you out. (For example my problem with connecting to Exchange and using SMTP was that McAfee anti-virus was blocking port 25 on my PC.)
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Originally posted by Paul Clapham:
I don't think that there are any alternative mail transport protocols besides SMTP.


"Protocols" was maybe the wrong word, but there are other ways to talk to mail servers - Lotus Notes for example has its own method (though it also supports SMTP these days). The traditional way to talk to an MS mail server was via MAPI, which is what I'm wondering may have been given as the only way to connect to this particular Exchange server.
John Davis
Ranch Hand

Joined: Nov 02, 2000
Posts: 189
Looking at MAPI documentation, it appears that it is used for getting email. I need to connect for the purposes of sending email.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18657
    
    8

Originally posted by Paul Sturrock:
The traditional way to talk to an MS mail server was via MAPI, which is what I'm wondering may have been given as the only way to connect to this particular Exchange server.
I forgot about MAPI. But surely Exchange servers that need to accept mail from the outside world have to support SMTP? At any rate, I think John needs to get competent help from within his own organization. We can really only speculate here.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Yup - and they do. You are right though, John needs to speak to his Exchange admin to find out why SMTP is not allowed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaMail but no SMTP