In the app.config/web.config you can use the configuration section <system.net> <mailSettings> <smtp> to configure how to deliver e-mails which are sent using the MailMessageand SmtpClient classes in your program.
In development environment you usually don’t want the e-mails to be delivered. Today I’ve found a awesome configuration option, which enables that all outgoing e-mails go to an local folder or file share as eml files.
SharePoint generates for each request a random GUID which correlates all log messages in the ULS log which are printed during the current request. The Correlation ID is also printed to error pages. If you want more information about an error page you can use the Correlation ID to find the right log messages in the ULS log.
Recently I wanted to get the current request’s Correlation ID to share it with an external webservice to have the same correlation ID in all depending systems.
You can add following code to your ASP page to get the Correlation ID.