Sending E-Mail with .Net and GMail

This was so easy I just had to share. // Create MailMessage Object MailMessage Msg = new MailMessage(email,”natthompson@natthompson.com”,subject,message); // Setup SmtpClient to point to GMail SMTP server SmtpClient client = new SmtpClient(“smtp.gmail.com”,587); // set your credentials client.Credentials = new System.Net.NetworkCredential(“<SOMEEMAILADDRESS>@gmail.com”, “XXXXXXX”); // turn on SSL client.EnableSsl = true; // send it! client.Send(Msg);

Modify Razor Layout for Mobile

Ok, so now I’m ready to begin modifying the SwappedBooks.com project for display on mobile devices.  This will involve the _Layout.cshtml file in the Views>Shared directory. When you open this file you will see code similar to the following: <meta charset=”utf-8″ /> <title>@ViewBag.Title</title> <link href=”@Url.Content(“~/Content/Site.css”)” rel=”stylesheet” type=”text/css” /> <script src=”@Url.Content(“~/Scripts/jquery-1.8.1.min.js”)” type=”text/javascript”></script> First add two meta[…]

How to Blend jQuery Mobile and .Net MVC

I’ve got an inkling that jQuery and .Net MVC together can produce some very powerful mobile web experiences.  So I’m setting up a Greenfield project at SwappedBooks.com.  The intent of the project is to build a site capable of running across multiple mobile devices and delivering a true e-commerce experience to users. Here, I’ll be[…]