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
2
votes
3 answers

Using MvcMailer in non-MVC project

I have a windows service that is supposed to send e-mails periodically. Next to the windows service project there is an MVC 3 project that is sending e-mails with MvcMailer (beautifully). I want to use the same engine to send e-mails for the windows…
Fabio Milheiro
  • 8,100
  • 17
  • 57
  • 96
2
votes
1 answer

No body in message (MvcMailer + Orchard CMS)

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…
REMESQ
  • 1,190
  • 2
  • 26
  • 60
2
votes
1 answer

MvcMailer unit test with Rhino Mock, how to?

In a new project we use MvcMailer, it's great and I would like to know how I can test it using Rhino and NUnit? There's an other post on SO and a good Wiki page but it's not what I'm looking for. For my controllers I usualy test them with…
VinnyG
  • 6,883
  • 7
  • 58
  • 76
2
votes
1 answer

Create new HttpContext for MvcMailer so I can use async/await

I'm using MVCMailer which depends on an HttpContext to send out mail. In some cases I'm sending mail from a WebJob, or in an async task that is used in a flow that calls ConfigureAwait(false) so I lose the context before I hit the MVCMailer code. My…
SB2055
  • 12,272
  • 32
  • 97
  • 202
2
votes
2 answers

Sending multiple emails with transaction behavior (if one fails no emails get send)

Sorry if I failed to find an existing post with my problem. What am I trying to do is as follows: I simply want to send a couple of emails (2-3) to different people and more importantly with different content. The emails are official, important…
astian
  • 684
  • 7
  • 18
2
votes
1 answer

Send email using MvcMailer from WebApi project where ViewBag is not available

I have hybrid project of ASP Web Api and angular project similar to this one and I need to send emails from ApiControllers in it. I like MvcMailer and I'd prefer to use that. I managed it to actually send emails. However, I'm not sure how to pass…
Dmitry Efimenko
  • 10,973
  • 7
  • 62
  • 79
2
votes
3 answers

Sending emails to multiple adresses using MvcMailer

I have an emails variable that contains a list of e-mail addresses of users in a role. The list is not comma-separated. Here's the code that I have at the moment: public virtual MvcMailMessage AdminNotification() { var userRoles =…
nouptime
  • 9,929
  • 5
  • 22
  • 37
2
votes
1 answer

Why I receive "Value does not fall within the expected range"?

I have an asp.net mvc web application and some external cron job is calling a specific url from my CronJobController and execute a specific method like: /// /// Will be called externally by www.setcronjob.com. ///
Cristian Boariu
  • 9,603
  • 14
  • 91
  • 162
2
votes
2 answers

HTML Helper not recognizing "@Html.InlineImage"

I am trying to embed an email image in MVCMailer. The Github MvcMailer Step by Step Guide does provide a solution as shown below: STEP BY STEP GUIDE: //Place this in the View: @Html.InlineImage("logo", "Company Logo") //Place this in the…
user2789697
  • 227
  • 1
  • 7
  • 13
2
votes
2 answers

Using MVCMailer in asp.net MVC4 application, keep getting error on email send

I am using MVCMailer as my email harness for all the many email this web app will be sending. Getting emails sent is simple enough, but I can't get it working while I am testing on localhost. On the site I set it up like it says you need to. My web…
ledgeJumper
  • 3,560
  • 14
  • 45
  • 92
2
votes
1 answer

Cannot use MvcMailer NuGet install on .Net Framework 4 (4.0.3)

I followed the step by step guide to install MvcMailer via NuGet but: that didn't install any new Reference to my project the using Mvc.Mailer is not resolved on the UserMailer.cs this version is supposed to be compatible with .Net 4.0... Am I…
Bro
  • 327
  • 6
  • 15
2
votes
1 answer

Change From email address in MVCMailer 4.5

Does anyone know how to change the from email address in code to override the web.config settings. What I'm trying to do is allow someone to complete an online form and when the recipicant receives the email, it will be from the senders email…
CareerChange
  • 669
  • 4
  • 17
  • 34
2
votes
2 answers

Can't register MvcMailer with Castle Windsor

I'm trying to integrate MvcMailer into an ASP.NET MVC 4 app. I installed the package from NuGet and generated a mailer with the Scaffold command with no issues. I ended up with a new folder Mailers containing UserMailer and IUserMailer, and an…
s.m.
  • 7,895
  • 2
  • 38
  • 46
2
votes
0 answers

SendAsync email error in MvcMailer

when i want send mail Async in my controller with SendAsync method of MvcMailer i get to this error: System.InvalidOperationException An asynchronous operation cannot be started at this time. Asynchronous operations may only be started within an…
user197508
  • 1,282
  • 2
  • 18
  • 31
2
votes
1 answer

Sending emails from MVC C# with multiple from field

I am making an online system where I have multiple clients and my clients have multiple contacts. Now I want my client to be able to send emails to his contacts, so when his contact gets an email they see his company name and his email address in…
Riy
  • 479
  • 1
  • 8
  • 16