Sending mail with ASP.NET and Gmail

After a server upgrade I had to setup my mail again. It seems that IIS7 has lost it’s core mail functionality, so I tried to use the SMTP service from Gmail for sending my e-mail. First thing I did is to setup a simple test page, that I would like to share with you. Front The page contains a simple web form for inserting some test data and is looking like this:           The markup code   <%@ Page Language="C#" AutoEventWireup="true" CodeFile="gmail_mailtest.aspx.cs" Inherits="SendMail" %> <html> <head runat="server"><title... [More]

Developing with DevNullSmtp mailserver

When you are developing a .NET website with e-mail functionality you often want to test the mails your code is sending. Often you can use a SMTP mail server within the domain, but you’re always have to worry about not sending test e-mail to the outside world. Alternatively you could setup your own mail server somewhere, but getting everything in place and configured is not always easy. Lately I started using DevNullSmtp mailserver for developing mail applications. It’s purpose is simple: catch the mail sent to port 25, log the message and destroy it (hence the name DevNull). It ha... [More]