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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:36:19+00:00 2026-05-29T10:36:19+00:00

I am using MvcMailer with Orchard CMS in a module I created, and although

  • 0

I am using MvcMailer with Orchard CMS in a module I created, and although I can get it to send e-mails, the body of the e-mail is empty, leaving me to believe that Orchard is not picking up “/[Module]/Views/[NameOfMailerFolder/_Layout.cshtml” or “…/[NameofMailerView].cshtml”.

At first I thought that moving “/[Module]/Views/[NameOfMailerFolder]” either to the “/[ThemeBeingUsed]/Views” folder or to the “/Views” folder of Orchard.Web might work (I thought it was just not finding the paths). But no luck.

I tried playing around with route.cs in my module, but I don’t know whether or not I can just leave CONTROLLER and ACTION empty (“”) and put the “/[Module]/Views/[NameOfMailerFolder]” in there only. In any event, I created a route for “[NameOfMailerView].cshtml” but that hasn’t worked either. I am wondering if this is even the right way to go (I did not set up actions in a controller, but am thinking to do so – just going to have to redirect?).

I’m a bit lost, so I appreciate any guidance.

  • 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-29T10:36:20+00:00Added an answer on May 29, 2026 at 10:36 am

    It turns out that the Mailer code uses a MasterName, which is what appears to cause problems with Orchard CMS’s way of doing things.

    This is what gets it working for me (using 1.3 or Orchard.Web):

    public QuoteMailers()
        : base()
    {
        //LEAVE OUT FOLLOWING FOR MVC MAILER TO WORK
        //MasterName = "_Layout";
    }
    

    QuoteMailers is just my name, MvcMailer will create a name based on the parameters you use if you are using the Package Manger Console in VS.

    Commenting out MasterName is what works! The only drawback to this “hack” is that I don’t use a common _Layout file. To me that’s no big deal because I am AM able to use Partials.

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

Sidebar

Related Questions

Using the HTML5 File API I can get the Binary String representation of a
I'm using the excellent MvcMailer package to send email from within my application. I'm
I am using MvcMailer with my website to send html emails. seems good, but
Im looking to use MVCMailer to send emails using asp.net mvc 3 with razor.
Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
Using jQuery, one can easily find out whether a particular element is visible using
Using NSDateComponents I know how to get the day component, but this gives me
Using the following as an example (with $db being a previously created database connection
Using Tsql, how can I find out when MS SQL server was installed?

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.