Improve performance on sending bulk emails through spring-mail

前端 未结 3 912
无人共我
无人共我 2020-12-18 16:48

I have a spring-stand alone application which uses simple spring email code as below , the to and the message is constructed using the values iter

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-18 17:30

    You can enclose sendMail into separate Runnable class and put tasks into ExecutorService ( or use @Async above sendMail method, but this is harded to configure - just my opinion ).

提交回复
热议问题