Last week, I figured out how to use distributed SMTP. It is super cool.
Reason: use this technique if you want your web server to send email but when your web app tries to send email via the corporate email server, it seems to take a long time, or it errors out (or complains about permissions. etc)
Pre requisites: Install SMTP on your web server. It is part of IIS and is not installed by default.
If your production email server is MS Exchange server or if it requires authentication, you will probably want to set up “Outbound Security”.
Then, you will want to set up “Advanced” routing.
3. Outbound security just makes it easier for your (web) SMTP server to contact/use the (production) mail server. Best practice is to set up a generic account for authenticating to that server instead of using your own personal credentials.
4. Advanced options allow you to send the email to buffer the outgoing mail on your local smtp server, which will attempt to deliver it via your production server. I set it up to attempt to send on its own before attempting to use the production email server (aka “Smart host”). It seemed to work best.
So, there it is. Now my web server doesn’t seem to hang when it sends email, it buffers the outgoing mail, other servers don’t suspect me of spamming and the email server is authenticating outgoing mail.