Back Forum Reply New

Failover in Spring Mail Support

quot;/gt;
lt;/beangt;

Now we have a requirement whereby we can specify failover hosts too , whereby if the mail server at stegbpm01 is down it can connect to some alternate mail server hosts. Is it already supported in springs ,
something like -gt;

lt;property name=quot;hostquot; value=quot;stegbpm01.smtp.com,stegbpm02.smtp.comquot;/gt;

or

lt;property name=quot;hostquot; value=quot;stegbpm01.smtp.comquot;/gt;
lt;property name=quot;failoverHostquot; value=quot;stegbpm02.smtp.comquot;/gt;

Thanks in advance.

- Anindya

Hi all.. just thinking is it a good idea to have my own MailSenderClass that extends JavaMailSenderImpl and overrides the doSend method something like this ..
Transport   transport = getTransport(getSession());transport.connect(..

first I try with the main smtp server and then with the failover one .. I guess I can check for transport.isConnected( to make sure it is connected ( or some exception that can be handled )..

Either way the issue is later if we upgrade our version of spring and there is some changes in this API , the code may no longer be correct or a usable one.

Please advice , any thoughts on how this can be implemented will be of gr8 help...

- Cheers ,
Ani
¥
Back Forum Reply New