I was working with a co-worker the other day trying to see what our emails looked like when they were sent from a webpage. We had some formatting issues and wanted to see the actual message on the server right after it was generated. The problem, we couldn't capture it fast enough on the server.
I realized one small trick, turn just the SMTP service off that comes with IIS. Messages queue up in the local pickup folder. After you turn the service on, the messages are delivered as normal. This works both for troubleshooting webpages generated with classic asp, asp.net or a 3rd party script. Here is an example of what I did.
Stop the service.

Generate a message

Look in the pickup folder

Poof! The message is still there. Your webpage will still work. I get a lot of questions in the newsgroups asking where are my messages or what do my messages look like. You can review the email headers in Notepad while it remains in the pickup folder. If you have several messages in the folder, just use the Search feature to look inside files for your message.
Here are the headers from the sample email.
X-Receiver: steve@example.com
X-Sender: steve@example.com
Thread-Topic: Sending email with CDO
thread-index: Acd4LFre6hIxY5VuRXC44UTFQUbrpQ==
From: <steve@example.com>
To: <steve@example.com>
Subject: Sending email with CDO
Date: Fri, 6 Apr 2007 05:17:10 -0400
Message-ID: <000001c7782c$5af81390$3e00a8c0@aspdot.net>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
This is a message.
Here is the ASP code used to generate the message.
<%
Set myMail=Server.CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From=steve@example.com
myMail.To=steve@example.com
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
response.write "Email was sent at " & Now()
%>
Hope that helps in your SMTP troubleshooting.