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

sending multiple emails with mvcmailer

Im looking to use MVCMailer to send emails using asp.net mvc 3 with razor. Also mentioned by ScottHa It looks fairly straight forward, however i'm confused as to how I would send batch emails eg like a newsletter to a list of users. do i create a…
raklos
  • 28,027
  • 60
  • 183
  • 301
4
votes
3 answers

How to move CSS inline with PreMailer.Net whilst using MvcMailer for sending HTML emails

Using MvcMailer, the problem is that our emails are being sent without our CSS as inline style attributes. PreMailer.Net is a C# Library that can read in an HTML source string, and return a resultant HTML string with CSS in-lined. How do we use them…
Zac
  • 1,722
  • 1
  • 19
  • 22
4
votes
1 answer

Value does not fall within the expected range error

I'm developing an ASP.Net MVC 4 application. I have a module that sends out the invoice in an email (using MVCMailer) for some reason at I get the error: Value does not fall within the expected range If I step through the code it works without any…
hjavaher
  • 2,589
  • 3
  • 30
  • 52
4
votes
1 answer

Mvc.Mailer send empty body mail C# webApi

I am using MVCMailer and trying to send mail from WebApi, but mail always arrives with an empty message. view is in /Views/Account/CreateUser.cshtml and this is my code public class Account: MailerBase { public MvcMailMessage…
mir89
  • 95
  • 1
  • 8
3
votes
2 answers

web.config related error - Sections must only appear once per config file

ive just installed and im trying to get MVCMailer to work. i get an error stating " Sections must only appear once per config file. See the help topic for exceptions." i understand the basics that it means i should only have 1 pages tag (i guess…
loveforfire33
  • 1,090
  • 3
  • 25
  • 46
3
votes
1 answer

Email Form with MvcMailer

I am developing an MVC 3 application and I am sending emails using MvcMailer.I am able to send basic emails, but I am trying to email the contents of a form and can't seem to work it out. Here is the code for my model: using System; using…
Amy
  • 503
  • 4
  • 9
  • 20
3
votes
2 answers

MvcMailer: Can't complete NUnit tests on Razor Views which use Url.Action

Here's my problem - I am using MvcMailer to create nicely formatted emails using Razor syntax, and it's a great tool to use for that! The issue I'm running into is this - here's some syntax from my View for one of the emails i send:

Click here to…

Aaronontheweb
  • 8,224
  • 6
  • 32
  • 61
3
votes
1 answer

mail server requires authentication when attempting to send to a non-local e-mail address when using MVCMailer

I want to send NewsLetter Emails to users. I have done like this: public ActionResult SendNewsLetter() { _userMailer.NewsLetter().Send(); return View(); } and in userMailer class: public virtual MvcMailMessage…
Hashem Aboonajmi
  • 13,077
  • 8
  • 66
  • 75
3
votes
1 answer

Proper way to change DisplayName of Email in MVCMailer

I looking to change the display name in a Email using MVCMailer. Instead of the client seeing From: custmerservice@xyzCompany.com they will see "xyzCompany Customer Service". I have looked all around the internet and can not find any documentation…
user2789697
  • 227
  • 1
  • 7
  • 13
3
votes
2 answers

Error in "using Mvc.Mailer;"

I am trying to use MvcMailer for sending e-mail in my MVC3 Application. I have successfully installed the package MvcMailer. Used Reference Unable to install MvcMailer and followed the steps But there is error while using it. using Mvc.Mailer; The…
blue
  • 568
  • 3
  • 10
  • 30
3
votes
1 answer

Is it possible to run mvc mailer from a separate project

I'm currently running an MVC website alongside a WebApi and I'm looking into building in the email functionality. I have very lightweight controllers abstracting most of the logic away to a service layer as it's a fairly big application and I want…
Neil
  • 5,179
  • 8
  • 48
  • 87
3
votes
1 answer

MVCMailer SendAsync() fails with Amazon SES

If I use Send() with MVCMailer, my SES works fine, but SendAsync() shows the error message below, does anyone know of a work around for this? THanks! System.Net.Mail.SmtpException: Failure sending mail. ---> System.InvalidOperationException: An…
williamsandonz
  • 15,864
  • 23
  • 100
  • 186
3
votes
1 answer

Faking an HTTPContext for MVC Mailer

I need to send out emails from an asp.net MVC application and I am using MVC mailer to do the job. As long as there is an HTTPContext it works fine. Unfortunately, I also need to send out emails where there is no context. The newer version of MVC…
William Hurst
  • 2,231
  • 5
  • 33
  • 54
3
votes
2 answers

Pass a model to an MVCMailer view

I have a controller, which passes a model (ovw.ToList()) to a view: // // GET: /Clinic/Overview/ public ActionResult Overview() { IEnumerable ovw = from c in db.Clinics select c; …
Mark
  • 7,778
  • 24
  • 89
  • 147
2
votes
1 answer

mvcMailer complains about SMTP host, when I want to use a pick-up directory

This has been getting on my nerves quite a bit because I can't find a reason for this not to work. I have an mvcMailer code that works if I specify in web.config to use SMTP. I don't want to use SMTP though, I want to use the drop folder. This is…
Dennis
  • 373
  • 1
  • 6
  • 21