Questions tagged [postal]

Postal lets you create emails using regular ASP.NET MVC views.

Postal is an email library for ASP.NET MVC.

Main Project Site: http://aboutcode.net/postal

80 questions
24
votes
4 answers

How to include CSS styles inline in Razor view?

I am using Postal to render MVC Razor views and send them via email. I have a custom CSS that I have defined specifically for the email views. Currently I am including them as follows: @Styles.Render("~/Content/EmailStyles.css") However, this only…
luksan
  • 7,661
  • 3
  • 36
  • 38
12
votes
2 answers

Using Postal MVC with Layout parse Headers as mail body

It seems when I use Postal to send an email using Layout, the headers was not parsed and included on the mail message. Views/Emails/_ViewStart.cshtml @{ Layout = "~/Views/Emails/_EmailLayout.cshtml";…
puntapret
  • 201
  • 4
  • 10
7
votes
1 answer

Error when sending email using postal MVC?

Requirement: Send emails to all users dynamically everyday at a particular time, say 6:00 AM. What I did so far: I use a third party library called Quartz.net from Nuget. public class TaskScheduler : IJob { public void…
sony
  • 1,453
  • 3
  • 35
  • 79
7
votes
3 answers

Hangfire background job remain enqueued

I have a MVC application and I am trying to send an email using Hangfire and Postal. The email must be sent after a registration. The registration works properly, but the job I run remain enqueued and I not receive any email. So in my MVC…
Simone
  • 2,304
  • 6
  • 30
  • 79
6
votes
2 answers

What's the equivalent of @Html.Raw in Postal?

I'm running Postal from a service. My @Message has html. @Html.Raw is not available. When Postal runs my templated view, I get HtmlEncoded html. does anyone know how to fix this?
CurlyFro
  • 1,862
  • 4
  • 22
  • 39
5
votes
1 answer

Using Postal Library From the Business Layer

I have a website built using ASP.NET MVC3 which is layered as follows: ProjectName.Shared (model + service contracts) ProjectName.Infrastructure ProjectName.Data ProjectName.Data.Sql ProjectName.Managers (Business layer) ProjectName.Services (WCF…
Kassem
  • 8,116
  • 17
  • 75
  • 116
4
votes
3 answers

The virtual path '/' maps to another application, which is not allowed. MVC and Hangfire

I have tried other solutions posted to stackoverflow and have found none that work, here is my problem. So I want to send an email using hangfire through my MVC application, this works on my local machine but when I upload it to a remote server I…
GeorgeB
  • 808
  • 1
  • 8
  • 26
4
votes
2 answers

Use Url.Action to generate fully qualified anchor

I'm using Url.Action to generate link in e-mails (with the Postal MVC Framework) that was sent by my application, however, the links generates are showing with "localhost" name, and not domain name. I'm using the following…
Dan
  • 1,518
  • 5
  • 20
  • 48
4
votes
4 answers

How to exclude cshtml from pre compilation during publish

I have cshtml files in a c# web forms project that I want to publish using a publish profile that has the options: Allow precompiled site to be updateable = false I am using Postal outside of ASP.net http://aboutcode.net/postal/outside-aspnet.html…
Steven Anderson
  • 8,398
  • 4
  • 27
  • 32
4
votes
1 answer

Color the postal code area in google maps api?

I want to show each postal code differently by having border around it and color inside its area. I am using google maps api service in js.
neha thamman
  • 231
  • 2
  • 6
  • 18
3
votes
2 answers

Razor exception compiling template

I'm trying to use Postal to send out emails from a service (not in an ASP.NET project). I keep getting exceptions with the following message: error CS0103: The name 'model' does not exist in the current context I'm following the tutorial from the…
David Pfeffer
  • 38,869
  • 30
  • 127
  • 202
3
votes
1 answer

@Raw statement is unknown in razor view file (ASP.NET MVC5)

Hej Community, I am fairly new asking questions at SO so pardon if I am unclear at some point and just drop me a note and I will clarify. Stack ASP.NET MVC5 Postal.net The Situation I have a class library to send emails from my web app using…
mmr
  • 383
  • 3
  • 12
3
votes
2 answers

Using Postal and Hangfire in Subsite

I have been trying to use Postal on my MVC5 site. When I host my webpage a subsite ie, http://localhost/Subsite I am receiving the error The virtual path '/' maps to another application, which is not allowed I have debugged it down to when the…
Jeff
  • 73
  • 6
3
votes
2 answers

How to make CC field optional using postal asp.net

I am using postal to send email using postal service in my asp.net mvc application now the issue is I have to send CC email in specific cases only and I have to make this field optional but I am not been to achieve this so far. Following is my code…
Muhammad Raza
  • 424
  • 5
  • 22
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
1
2 3 4 5 6