Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4596652
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:08:43+00:00 2026-05-21T23:08:43+00:00

I would like to know if there is a simple way to capture a

  • 0

I would like to know if there is a simple way to capture a transcript of the SMTP session when sending email using the System.Net.Mail.MailClient. In cases where an error is generated (ex: relaying denied) I would like to display the whole transcript to the user.

If there are previous questions that discuss this I was unable to find them. I am working with VB.NET, but C# examples are also appreciated. Thanks in advance for any suggestions!

Cheers,
JE

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T23:08:44+00:00Added an answer on May 21, 2026 at 11:08 pm

    I think you can get the actual transcript by turning on logging for system.net. Unfortunately I don’t think this is real-time so its not an option for you. Instead you’ll just have to try sending and catching the SmtpException and then inspecting the SmtpException.StatusCode.

    If you’re having another process send for you (such as IIS) and you’re basically just dropping off messages for it to deliver then there’s no real way to get some of these exceptions in real-time unfortunately.

    There is an interesting SMTP-tester post here that I’ve never tried but sounds interesting.
    Can I test SmtpClient before calling client.Send()?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know if there is a simple way to parse HTML
I would like to know if there is a simple way of measuring the
I would like to know if there is any simple/fast way to create a
I would like to know if there is a simple way to configure django
I would like to know if there was a simple way of generating localized
I would like to know if there is a simple way to add a
I would like to know if there is any way to capture a to
I would like to know if there is any way to add custom behaviour
I would like to know if there is some way to share a variable
I would like to know if there is a way to disable automatic loading

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.