aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes multiple smtp host 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 "multiple smtp host" Watch "multiple smtp host" New topic
Author

multiple smtp host

Hamid Virani
Ranch Hand

Joined: Jul 26, 2005
Posts: 41
Hi,

I want a mechanism, such that when e-mail sending fails, on one of the smtp server, it tries to send the mail through an alternate smtp host. How can I acheive this?

Regards,
Hamid
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42280
    
  64
This kind of logic would need to be part of the client, because the server is not available to do anything. What kind of client are you using - JavaMail? It might be as simple as handling the exception that occurs if the server is not available, and using a different server as the fallback in that case.


Ping & DNS - my free Android networking tools app
Hamid Virani
Ranch Hand

Joined: Jul 26, 2005
Posts: 41
Yes, I am using JavaMail API. Thanks for your reply. I was thinking on the same line, i.e. catching the Exception, and then use alternate server, if there is an Exception.

But I thought maybe there is some other trick as well (in JavaMail API itself), which I am missing out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: multiple smtp host