Questions tagged [mvcmailer]

MvcMailer provides you with an ActionMailer style email sending NuGet Package for ASP.Net MVC 3. So, you can produce professional looking emails composed of your MVC master pages and views with ViewBag.

MvcMailer is an ASP.NET MVC Mailer, inspired by Ruby on Rails ActionMailer, that helps composing Email body using regular ASP.NET MVC views.

Step by step guide: https://github.com/smsohan/MvcMailer/wiki/MvcMailer-Step-by-Step-Guide

Introduction: http://www.codeproject.com/KB/aspnet/MvcMailerNuGet.aspx

Installation

MvcMailer can most easily be installed through its NuGet package.

Install-Package MvcMailer
114 questions
12
votes
7 answers

Error Scaffolding with MvcMailer in MVC 4

I'm trying to get MvcMailer working in a new MVC 4 Beta project (created just for trying this out), using the latest version of NuGet. I get to the step PM> Scaffold Mailer UserMailer Welcome,PasswordReset At which point I see the error…
Eric J.
  • 147,927
  • 63
  • 340
  • 553
11
votes
3 answers

Are there any MVC Email Packages That Don't Require a HTTP Context?

We send emails from our ASP.NET MVC 3 Razor Web Application. Currently we're using ActionMailer.NET. I've looked at MvcMailer. The problem with both is that they need a Http Context to execute. The problem with this is that i want to send emails…
RPM1984
  • 72,246
  • 58
  • 225
  • 350
10
votes
4 answers

Send async e-mails

I am using ASP.NET MVC 3 with MVCMailer, I tried to send e-mails using SendAsync, but actually it still take longer. So I am trying to use Task.Factory like the code bellow: var task1 = Task.Factory.StartNew( state => { …
Michel Andrade
  • 4,056
  • 5
  • 27
  • 28
9
votes
2 answers

How to use MVCMailer without breaking my service layer?

I am looking into using MVcMailer to make nicer emails. However one thing that I am unsure is how to organize the code. I currently have 2 projects. One for mvc and one for my repos and service layers. my 2nd project has no knowledge of MVC and I…
chobo2
  • 83,322
  • 195
  • 530
  • 832
8
votes
1 answer

MvcMailer: Taking user input in view through model and then inserting it into mail

I don't know if I am explaining this correctly, or if the solution is rather simple, so here goes: I am using MvcMailer, but before that I set up a wizard input form which I call Quote.cshtml. Behind Quote.cshtml, I set up a model called…
REMESQ
  • 1,190
  • 2
  • 26
  • 60
8
votes
4 answers

MvcMailer unit tests: System.ArgumentNullException httpContext cannot be null

I cannot successfully run unit tests for MvcMailer using the visual studio test suite and Moq. I have copied the example from the wiki word for word but get the following exception every time: Test method MvcMailerTest.Tests.MailerTest.TestMethod1…
woggles
  • 7,444
  • 12
  • 70
  • 130
8
votes
4 answers

"Main" method in ASP.Net MVC Project - aka method to run before pages are loaded?

I have a project that is basically only an MVC project because it gives intellisense for Razor views and the library (Mvc.Mailer) depends on HttpContext. Right now I have to load a page in order for the constructor in my MvcApplication to run, or…
Caleb Jares
  • 6,163
  • 6
  • 56
  • 83
8
votes
1 answer

Can MvcMailer be used in a class library?

I want to use MvcMailer in a class library, which would essentially be my one-stop-shop for composing and sending emails for my solution. I thought that that is what MvcMailer was designed for, but it appears it cannot find any of my .cshtml…
smdrager
  • 7,327
  • 6
  • 39
  • 49
7
votes
1 answer

MvcMailer Send() extension method missing in ASP.Net MVC 4

After upgrading one of my websites to MVC 4 and upgrade all my packages in NuGet I seem to have lost the Send() extension method for the MvcMailer package from NuGet. I have not made any code changes other then those necessary to upgrade the project…
Alex Hope O'Connor
  • 9,354
  • 22
  • 69
  • 112
5
votes
1 answer

using MvcMailer in WCF

We're creating an app that uses ASP.NET MVC4 for the web app and WCF for the web services that access a common data store. The web app send emails using MvcMailer, I was hoping someone could point me to some resources that show how MvcMailer can be…
Vimal Stan
  • 2,007
  • 1
  • 12
  • 14
5
votes
1 answer

MVCMailer smtp mailsettings set configuration settings programmatically

MVCMailer uses the smtp settings from the web.config file as follows:
woggles
  • 7,444
  • 12
  • 70
  • 130
5
votes
1 answer

Does MvcMailer SendAsync block a ASP.NET MVC Request?

Does anyone know if the MvcMailer SendAsync method in SmtpClientWrapper blocks a ASP.NET MVC Request? Looking at the MvcMailer wiki and the code I would say yes. So I would still need to use something like WebBackgrounder as disussed here for a…
DalSoft
  • 10,673
  • 3
  • 42
  • 55
4
votes
2 answers

How set up different stmpclient instances in web.config?

I don't believe this is specifically an MvcMailer question (this is the mailer I am using), but I am struggling with framing a Googleplex search to figure out how to send e-mails from different accounts based on my context. I have a need to send two…
REMESQ
  • 1,190
  • 2
  • 26
  • 60
4
votes
2 answers

MVCMailer SendAsync and deleting attachments

I'm having trouble getting MVCMailer to delete attachments after sending an email asynchronously. I can't figure out what to do to dispose of the message to free up processes attached to the message attachments. Following the instructions here.... …
James South
  • 10,147
  • 4
  • 59
  • 115
4
votes
3 answers

Using MVCMailer to embed image in email

How do you use MVCMailer to embed an image into a email? I've tried something along the lines of with no success. Any examples? Thanks
woggles
  • 7,444
  • 12
  • 70
  • 130
1
2 3 4 5 6 7 8