I am a student at Grantham University and I had difficulty in getting an email to send off from and to my Gmail account during the exercises in chapter 9. Before going on to the next exercises I decided to do some searching around on the internet to try and find the answer in combination with the book and code we were supposed to use. Although I did not find the answer spelled out for me, I did find my answer. In the code snippets that were put into the book for the web.config file:
<network enableSsl="true" userName="
[email protected]" password="yourpassword" host="smtp.gmail.com" />
this was referred to as the snippet if you use gmail, after this paragraph a small line indicating that if Ssl is used to check with your host for specific requirements. Assuming that the code provided was what was exactly needed for Gmail, I thought nothing of it. The code does not say where or how to insert the port and the setup for POP mails at Gmail says to use 465. The common ports are 465 and 587 and 587 is a backup. I added the 465 many times inside this snippet with failure and thinking that I was not doing the right thing, however with exausted attempts I tried the backup of 587 and it worked. My thought for the code to avoid confusion will be this:
<network enableSsl="true" userName="
[email protected]" password="yourpassword" host="smtp.gmail.com" port="#" />
It was well explained to input your information in the other areas but this small addition could be added and help other students or novice web developers.