by Marius Gheorghe
18. April 2010 08:31
You can use Gmail as SMTP server to send emails. When i launched Topi last week i decided to use Gmail instead of the mail server of the hosting company (since Gmail is much more reliable). To configure it you can simply drop this into web.config (replace test with actual account data):
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="test@gmail.com">
<network host="smtp.googlemail.com" port="587" defaultCredentials="false" userName="test@gmail.com" password="test"/>
</smtp>
</mailSettings>
</system.net>
Make sure you use port 587 because it won't work with the other one. Also i decided to use log4net to receive logging data for email so, since log4net Smtp appender doesn't support TLS authentification, i have added this to Microruntime.