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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:15:00+00:00 2026-05-15T20:15:00+00:00

In an ASP.NET MVC application, how should the sending of emails be handled? I’ve

  • 0

In an ASP.NET MVC application, how should the sending of emails be handled? I’ve been thinking about this, and I really like the idea of handling it in an MVC-oriented way (it is an MVC application, after all.)

What I mean is that the email that gets delivered to the user is really just a view that should have a model passed to it. This raises some questions: How should we deliver views to both the requesting browser and an SMTP server at the same time, when an action is executed? Does the framework have any facilities to support this? If not, is there some 3rd party release/guidance for this sort of functionality?

The alternatives to treating email sending in an MVC way are:

  • Email sending code shows up in the controller’s action methods.
  • Email sending is a behavior of the Model objects.

How are you handling the sending of emails in your ASP.NET MVC applications? What do you think about an MVC-oriented approach?

  • 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-15T20:15:01+00:00Added an answer on May 15, 2026 at 8:15 pm

    Usually when you’d need a new result type, you would program a new MyResult object that would inherit from ActionResult. This way your action method would be free to choose the result type that was indicated, and the View Engine would simply call the ExecuteResult() method on the new result type, which would hold the logic on how to render the data.

    However, since what you’re doing sounds like you just want to get HTML from a View and email it (it’s the same result type as for the web browser), the answers to this question should cover it in depth. Note that the answers with the code for MVC 2.0 are the best way to go, since they added the “render a view to a string” functionality into the second release due to popular demand.

    Your question is a good one, as I would highly recommend an MVC approach to any output from your program. Sending a view to email is conceptually no different than sending a view to any other output type (PDF, mobile browser, SMS), and by building pluggable view outputs, you have an easy way to support expansion of the usage of your app.

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

Sidebar

Related Questions

I'm creating an intranet asp.net mvc application that everyone in the company should have
In a multi-tenant ASP.NET MVC application based on Rob Conery's MVC Storefront, should I
I have a COM library I should use in my ASP.NET MVC application. However
I'd like to implement ASP.Net MVC application which could have controllers, views and content
I'm starting to develop a new ASP.NET MVC application, and I'd like to make
I have ASP.NET MVC application with action which should process posted XML data. At
In a typical ASP.net mvc application which layer should talk to WCF service ?
I'm using AutoMapper in an ASP.NET MVC application. I was told that I should
Should the AntiForgeryToken be applied to every post action in an ASP.NET MVC application?
I have an ASP.Net/MVC application and I'm trying to send HTML emails. I'm doing

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.