It is actually quite easy to setup a local SMTP and routing through Gmail to test sending emails from your application. There are a few good posts on this that you can follow:
- https://fmuntean.wordpress.com/2008/10/26/how-to-configure-iis-smtp-server-to-forward-emails-using-a-gmail-account/ (note that it works for me without enabling POP in Gmail)
- http://www.vsysad.com/2014/01/configure-iis-smtp-server-to-use-gmail-to-forward-messages/
I however had an issue where the mails would get stuck in the Queue folder (e.g. C:\inetpub\mailroot\Queue).
I tried turning off Windows Firewall and enabling POP in Gmail but it did not help.
In the end it was because 2-factor authentication was enabled on my Gmail account. Disabling this fixed the issue for me. Here is a help document for disabling 2-factor authentication, just in case you need it: https://support.google.com/accounts/answer/1064203?hl=en.