postal

Page times out sending emails, even though emails are sent

拟墨画扇 提交于 2019-12-11 01:37:47
问题 This issue has left me stumped. This question may need to be migrated to Server Fault, but there is a programming component, so I figured I'd start there. Also, our infrastructure team ardently believes everything is fine on their end, but that doesn't always mean anything. Anyways, I've got a simple GET-POST-Redirect action that sends two separate emails using the Postal nuget package, before redirecting to a success page -- pretty basic stuff. The action is async, and I'm using await email

Using Postal and Hangfire in Subsite

吃可爱长大的小学妹 提交于 2019-12-07 23:44:37
问题 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 ControllerContext is being created the HttpContext isn't getting set correctly. Since I'm running Postal from Hangfire the HttpContext.Current is always null. Postal creates the ContollerContext using the code below. ControllerContext

Using Postal Library From the Business Layer

喜欢而已 提交于 2019-12-07 07:47:38
问题 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 services) ProjectName.UI.Main (ASP.NET MVC3 application) This is actually the structure I recently came up with after some refactoring. Unfortunately, there isn't complete separation between the UI and my business layer so this area could use some

Using Postal and Hangfire in Subsite

扶醉桌前 提交于 2019-12-06 10:49:57
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 ControllerContext is being created the HttpContext isn't getting set correctly. Since I'm running Postal from Hangfire the HttpContext.Current is always null. Postal creates the ContollerContext using the code below. ControllerContext CreateControllerContext() { // A dummy HttpContextBase that is enough to allow the view to be rendered. var httpContext =

Using Postal Library From the Business Layer

做~自己de王妃 提交于 2019-12-05 10:12:56
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 services) ProjectName.UI.Main (ASP.NET MVC3 application) This is actually the structure I recently came up with after some refactoring. Unfortunately, there isn't complete separation between the UI and my business layer so this area could use some more refactoring - which I cannot do right now because I'm on a tight deadline. As for now, my client has

How to include CSS styles inline in Razor view?

血红的双手。 提交于 2019-11-30 04:53:02
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 includes the relative link to the stylesheet, which will not work in an email: <link href="/Content/EmailStyles.css" rel="stylesheet"/> I want to include the stylesheet inline so that it functions properly in the email. What is the best way to render the contents of a file-based resource within an MVC view? I guess you will need to have a custom

How to include CSS styles inline in Razor view?

╄→尐↘猪︶ㄣ 提交于 2019-11-29 02:27:28
问题 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 includes the relative link to the stylesheet, which will not work in an email: <link href="/Content/EmailStyles.css" rel="stylesheet"/> I want to include the stylesheet inline so that it functions properly in the email. What is the best way to