I'm developing an application with Spring. This application has customers, and each customer has his own mail server configuration (port, host, username, password,etc). My application must send emails through the Customers mail servers. I mean, I cannot use the classic:
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
There are going to be many MailServerImpls, one per customer, and I will have hundreds of them. Each time a Customer signs in, he is asked for this mail server configuration.
Upon certain actions of the customer, my application must send an email using the Customer mail server.
So, what is the best way to do this with Spring? I hope the best solution is not to do a new MailServerImpl() and set the attributes each time I have to send an email...
Thank you very much.
Aucun commentaire:
Enregistrer un commentaire