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 990763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:59:37+00:00 2026-05-16T05:59:37+00:00

ASP.NET Webforms application. Problem : How to implement emailling elegantly? Many parts of the

  • 0

ASP.NET Webforms application.

Problem: How to implement emailling elegantly?

Many parts of the application demand it. This will include HTML emails, solutions how to handle bouncebacks etc..

I have the option to use my own SMTP server (app is hosted on a VPS), or to use the hosting providers.

I’d like to start logging here too (log4net probably)

Any suggestions for libraries to use / patterns to implement?

EDIT: http://martinnormark.com/2010/03/13/generate-html-e-mail-body-in-c-using-templates

I like having a debug catch asp.net net.mail – route all emails to a different email address in debug mode

  • 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-16T05:59:38+00:00Added an answer on May 16, 2026 at 5:59 am

    For testing with a faked out SMTP server use ndumbster. Phil Haack has a blog post on usage – http://haacked.com/archive/2006/05/30/ATestingMailServerForUnitTestingEmailFunctionality.aspx

    As you pointed out email templates are fantastic. Consider creating a template for HTML and plain text. Make sure your HTML email templates use basic HTML as a number of email clients out there are not up to modern day browser standards (eg. Outlook which uses the Word HTML rendering engine).

    Log4Net is a good point to start at with logging. You can also use System.Diagnostics for simplistic tracing and debugging which can be written easily out to the event log or a file. I always prefer to have a wrapper for all logging so that logging frameworks can easily be swapped out if you find that you want to swap them out later because of a must have feature. It’s also good from the point of testability as you can mock it out easily.

    Really it doesn’t matter which SMTP server you use as long as you don’t get black listed. Make sure you check the SMTP servers IP against a DNSBL so you know if your SMTP host has a bad reputation. I highly recommend checking it using Barracuda Central’s IP reputation – http://www.barracudacentral.org/lookups. Also make sure you’re SMTP server does support resending when you’re recipients use grey listing.

    For bounce backs you can setup a POP account for it to send back to, it could be as simple as reading the emails and finding which email account the rejection came from and the subject of the previous email (which should be unique) so that you can send again later or after several bounce backs remove them from the list. To implement reading POP take a look at this thread – Reading Email using Pop3 in C#

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

Sidebar

Related Questions

I have a legacy application at my hand which uses ASP.NET WebForms. My problem
I have a ASP.NET Webforms application that is being used with Motorola Tablets (Android
I'm currently working on an ASP.Net WebForms application that allows a user to select
I'm working on an ASP.NET WebForms CMS application, and having a bit of trouble
Good Morning, I'm working on an ASP.NET 3.5 webforms application and have written the
Retrofitting ASP.NET WebForms themes to an old application I have a need to theme
The ASP.NET WebForms trace output has a section for Application State. Is it possible
With an existing n-tier web application using ASP.net WebForms what is the best approach
I'm just wondering, if I have an ASP.net Web Application, either WebForms or MVC,
I am going through a weird problem right now regarding routing in ASP.NET WebForms.

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.