I am using the SMTPClient
class which uses the following in the app.config
<system.net>
<mailSettings>
<smtp from="mailer <no_reply@mysite.com>">
<network defaultCredentials="true" host="192.168.1.101" port="25"/>
</smtp>
</mailSettings>
</system.net>
Is there a way to do add more SMTP servers (say 4 servers) and get the code to do a round-robin on which SMTP server to use?
For example, I have 4 SMTP servers: 192.168.1.101, 192.168.1.102, 192.168.1.103, 192.168.1.104, And I have 8 e-mails to send.
What I hope to achieve is:
Mail 1 sent using 192.168.1.101
Mail 2 sent using 192.168.1.102
Mail 3 sent using 192.168.1.103
Mail 4 sent using 192.168.1.104
Mail 5 sent using 192.168.1.101
Mail 6 sent using 192.168.1.102
Mail 7 sent using 192.168.1.103
Mail 8 sent using 192.168.1.104