You have to use the System.Net.Mail class to send emails in C#. The mail server settings are set up in your web.config file under the system.net mailsettings section. Consider that email is sent using GMail account would use the following host settings with port number 587:
<system.net>
<mailSettings>
<smtp from="[email_address_here]">
<network host="smtp.gmail.com" port="587" userName="[username]" password="[password]" enableSsl="true" />
</smtp>
</mailSettings>
</system.net>
At the top you may also include the class
using System.Net.Mail;
to have SMTP Client Access.