In my previous article I have explained about How to bind/Unbind events in jQuery. In this article I am going to explain about how to send mail from ASP.Net using gmail,yahoomail and live mail credentials.
First Include the below namespaces in your code behind file.
The namespace provides a simple programming interface for many of the protocols used on networks
The namespace contains classes used to send electronic mail to a Simple Mail Transfer Protocol (SMTP) server for delivery
Below is the code to send the mail using your gmail credentials
To call the above method
To add CC:
To add BCC:
If the message is in html format then set IsBodyHtml to true.
To send the attachments
You can add multiple email ids separated by comma( , ).
To send mail using yahoo account change the hostname and Enablessl property as below.
To send mail using Live mail account
Do you like this article? Help us to improve. Please post your comments below.