Posts

Showing posts from September, 2006

HOW TO send an email programmatically using C# with GMail

This is derived from a forum posting. System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage(); System.Net.NetworkCredential cred = new System.Net.NetworkCredential("yourid@gmail.com", "yourpwd"); mail.To.Add("acme@acme.com"); mail.Subject = "subject"; mail.From = new System.Net.Mail.MailAddress("yourid@gmail.com"); mail.IsBodyHtml = true; mail.Body = "message"; System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.gmail.com"); smtp.UseDefaultCredentials = false; smtp.EnableSsl = true; smtp.Credentials = cred; smtp.Port = 587; smtp.Send(mail); System.Net.Mail is the namespace used to send email if you are using the 2.0 .NET Framework. Unlike System.Web.Mail, which was introduced in the 1.0 Framework, it is not built upon the CDO/CDOSYS libraries. Instead it is written from the ground up without any interop. The System.Net.Mail FAQ contains numerous practical snippets Related link: HOW TO

Classic ASP & VS 2005

Did you know? You can build & debug Classic ASP pages with VS 2005 / Visual Web Developer on IIS. It is ofcourse, a better idea to migrate to ASP.NET

History & Future of ASP.NET

Did you know? ASP.NET is about 95% written in C# and the remainder in C++. Microsoft didn't originally own the ASP.NET domain name. Scott Guthrie , the man who runs the ASP.NET, Atlas, IIS 7, CLR, .NET CF & VS Teams, discusses all this alongwith architecture lessons learned, Atlas (with demo), IIS 7 & other goodies in the "History & Future of ASP.NET" webcast .