smsohan / MvcMailer

A Mailer for ASP.Net MVC that forms the Email Body using MVC Views (Razor etc.) following Ruby on Rails ActionMailer style
MIT License
582 stars 178 forks source link

emails not being sent on localhost windows #74

Closed solrevdev closed 5 years ago

solrevdev commented 11 years ago

at Microsoft.VisualStudio.WebHost.Request.GetRemoteAddress() at System.Web.HttpWorkerRequest.IsLocal() at System.Web.HttpRequest.get_IsLocal() at System.Web.HttpRequestWrapper.get_IsLocal() at System.Web.WebPages.WebPageHttpHandler.ShouldGenerateSourceHeader(HttpContextBase context) at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.StartPage.RunPage() at System.Web.WebPages.StartPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at Mvc.Mailer.StringResult.ExecuteResult(ControllerContext context) at Mvc.Mailer.StringResult.ExecuteResult(ControllerContext context, String mailerName)

smsohan commented 11 years ago

Can you paste your view file? Looks like its an issue with the razor view file.


Sent from my iPhone Sohan SM

On 2012-12-19, at 11:35 PM, solrev notifications@github.com wrote:

at Microsoft.VisualStudio.WebHost.Request.GetRemoteAddress() at System.Web.HttpWorkerRequest.IsLocal() at System.Web.HttpRequest.get_IsLocal() at System.Web.HttpRequestWrapper.get_IsLocal() at System.Web.WebPages.WebPageHttpHandler.ShouldGenerateSourceHeader(HttpContextBase context) at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.StartPage.RunPage() at System.Web.WebPages.StartPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at Mvc.Mailer.StringResult.ExecuteResult(ControllerContext context) at Mvc.Mailer.StringResult.ExecuteResult(ControllerContext context, String mailerName)

— Reply to this email directly or view it on GitHubhttps://github.com/smsohan/MvcMailer/issues/74.

solrevdev commented 11 years ago

thanks for such a fast response. its for all views. they actually work ok on appharbor its just locally they don't work.

i've asked my colleague john to strip down and get a reproducible example we can zip up and send so you have more info.

awesome project by the way. really nice.

thanks for your help.

John Smith

On Thursday, 20 December 2012 at 14:02, SM Sohan wrote:

Can you paste your view file? Looks like its an issue with the razor view
file.


Sent from my iPhone
Sohan SM

On 2012-12-19, at 11:35 PM, solrev <notifications@github.com (mailto:notifications@github.com)> wrote:

at Microsoft.VisualStudio.WebHost.Request.GetRemoteAddress()
at System.Web.HttpWorkerRequest.IsLocal (http://Web.HttpWorkerRequest.IsLocal)()
at System.Web.HttpRequest.get_IsLocal (http://Web.HttpRequest.get_IsLocal)()
at System.Web.HttpRequestWrapper.get_IsLocal (http://Web.HttpRequestWrapper.get_IsLocal)()
at
System.Web.WebPages.WebPageHttpHandler.ShouldGenerateSourceHeader (http://Web.WebPages.WebPageHttpHandler.ShouldGenerateSourceHeader)(HttpContextBase
context)
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy (http://Web.WebPages.WebPageBase.ExecutePageHierarchy)()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy (http://Web.Mvc.WebViewPage.ExecutePageHierarchy)()
at System.Web.WebPages.StartPage.RunPage (http://Web.WebPages.StartPage.RunPage)()
at System.Web.WebPages.StartPage.ExecutePageHierarchy (http://Web.WebPages.StartPage.ExecutePageHierarchy)()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy (http://Web.WebPages.WebPageBase.ExecutePageHierarchy)(WebPageContext
pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.RazorView.RenderView (http://Web.Mvc.RazorView.RenderView)(ViewContext viewContext, TextWriter
writer, Object instance)
at System.Web.Mvc.BuildManagerCompiledView.Render (http://Web.Mvc.BuildManagerCompiledView.Render)(ViewContext viewContext,
TextWriter writer)
at Mvc.Mailer.StringResult.ExecuteResult(ControllerContext context)
at Mvc.Mailer.StringResult.ExecuteResult(ControllerContext context, String
mailerName)


Reply to this email directly or view it on
GitHubhttps://github.com/smsohan/MvcMailer/issues/74.

— Reply to this email directly or view it on GitHub (https://github.com/smsohan/MvcMailer/issues/74#issuecomment-11574394).

smsohan commented 11 years ago

Thanks John. Do you have an SMTP server on your local? Can you see if its running at the specified port as in web.config?


Sent from my iPhone Sohan SM

On 2012-12-20, at 7:20 AM, solrev notifications@github.com wrote:

thanks for such a fast response. its for all views. they actually work ok on appharbor its just locally they don't work.

i've asked my colleague john to strip down and get a reproducible example we can zip up and send so you have more info.

awesome project by the way. really nice.

thanks for your help.

John Smith

On Thursday, 20 December 2012 at 14:02, SM Sohan wrote:

Can you paste your view file? Looks like its an issue with the razor view file.


Sent from my iPhone Sohan SM

On 2012-12-19, at 11:35 PM, solrev <notifications@github.com ( mailto:notifications@github.com notifications@github.com)> wrote:

at Microsoft.VisualStudio.WebHost.Request.GetRemoteAddress() at System.Web.HttpWorkerRequest.IsLocal ( http://Web.HttpWorkerRequest.IsLocal)() at System.Web.HttpRequest.get_IsLocal (http://Web.HttpRequest.get_IsLocal)()

at System.Web.HttpRequestWrapper.get_IsLocal ( http://Web.HttpRequestWrapper.get_IsLocal)() at System.Web.WebPages.WebPageHttpHandler.ShouldGenerateSourceHeader ( http://Web.WebPages.WebPageHttpHandler.ShouldGenerateSourceHeader)(HttpContextBase

context) at System.Web.WebPages.WebPageBase.ExecutePageHierarchy ( http://Web.WebPages.WebPageBase.ExecutePageHierarchy)() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy ( http://Web.Mvc.WebViewPage.ExecutePageHierarchy)() at System.Web.WebPages.StartPage.RunPage ( http://Web.WebPages.StartPage.RunPage)() at System.Web.WebPages.StartPage.ExecutePageHierarchy ( http://Web.WebPages.StartPage.ExecutePageHierarchy)() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy ( http://Web.WebPages.WebPageBase.ExecutePageHierarchy)(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.Mvc.RazorView.RenderView ( http://Web.Mvc.RazorView.RenderView)(ViewContext viewContext, TextWriter writer, Object instance) at System.Web.Mvc.BuildManagerCompiledView.Render ( http://Web.Mvc.BuildManagerCompiledView.Render)(ViewContext viewContext, TextWriter writer) at Mvc.Mailer.StringResult.ExecuteResult(ControllerContext context) at Mvc.Mailer.StringResult.ExecuteResult(ControllerContext context, String mailerName)

— Reply to this email directly or view it on GitHubhttps://github.com/smsohan/MvcMailer/issues/74.

— Reply to this email directly or view it on GitHub ( https://github.com/smsohan/MvcMailer/issues/74#issuecomment-11574394).

— Reply to this email directly or view it on GitHubhttps://github.com/smsohan/MvcMailer/issues/74#issuecomment-11574984.

solrevdev commented 11 years ago

we have tried local pick up directory and dummsmtp.com but its failing at StringResult.cs i think the method ExecuteResult and one of these two lines

ViewContext viewContext = new ViewContext(context, View, ViewData, TempData, writer); View.Render(viewContext, writer);

but as i said let me get my colleague to get more info for you. its so strange. works up on live. just not locally.

John Smith

On Thursday, 20 December 2012 at 14:22, SM Sohan wrote:

Thanks John. Do you have an SMTP server on your local? Can you see if its
running at the specified port as in web.config (http://web.config)?


Sent from my iPhone
Sohan SM

On 2012-12-20, at 7:20 AM, solrev <notifications@github.com (mailto:notifications@github.com)> wrote:

thanks for such a fast response. its for all views. they actually work ok
on appharbor its just locally they don't work.

i've asked my colleague john to strip down and get a reproducible example
we can zip up and send so you have more info.

awesome project by the way. really nice.

thanks for your help.

John Smith

On Thursday, 20 December 2012 at 14:02, SM Sohan wrote:

Can you paste your view file? Looks like its an issue with the razor view
file.


Sent from my iPhone
Sohan SM

On 2012-12-19, at 11:35 PM, solrev <notifications@github.com (mailto:notifications@github.com) (
mailto:notifications@github.com <notifications@github.com (mailto:notifications@github.com)>)> wrote:

at Microsoft.VisualStudio.WebHost.Request.GetRemoteAddress()
at System.Web.HttpWorkerRequest.IsLocal (http://Web.HttpWorkerRequest.IsLocal) (
http://Web.HttpWorkerRequest.IsLocal)()
at System.Web.HttpRequest.get_IsLocal (http://Web.HttpRequest.get_IsLocal)()

at System.Web.HttpRequestWrapper.get_IsLocal (http://Web.HttpRequestWrapper.get_IsLocal) (
http://Web.HttpRequestWrapper.get_IsLocal)()
at
System.Web.WebPages.WebPageHttpHandler.ShouldGenerateSourceHeader (http://Web.WebPages.WebPageHttpHandler.ShouldGenerateSourceHeader) (
http://Web.WebPages.WebPageHttpHandler.ShouldGenerateSourceHeader)(HttpContextBase

context)
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy (http://Web.WebPages.WebPageBase.ExecutePageHierarchy) (
http://Web.WebPages.WebPageBase.ExecutePageHierarchy)()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy (http://Web.Mvc.WebViewPage.ExecutePageHierarchy) (
http://Web.Mvc.WebViewPage.ExecutePageHierarchy)()
at System.Web.WebPages.StartPage.RunPage (http://Web.WebPages.StartPage.RunPage) (
http://Web.WebPages.StartPage.RunPage)()
at System.Web.WebPages.StartPage.ExecutePageHierarchy (http://Web.WebPages.StartPage.ExecutePageHierarchy) (
http://Web.WebPages.StartPage.ExecutePageHierarchy)()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy (http://Web.WebPages.WebPageBase.ExecutePageHierarchy) (
http://Web.WebPages.WebPageBase.ExecutePageHierarchy)(WebPageContext
pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.RazorView.RenderView (http://Web.Mvc.RazorView.RenderView) (
http://Web.Mvc.RazorView.RenderView)(ViewContext viewContext, TextWriter
writer, Object instance)
at System.Web.Mvc.BuildManagerCompiledView.Render (http://Web.Mvc.BuildManagerCompiledView.Render) (
http://Web.Mvc.BuildManagerCompiledView.Render)(ViewContext viewContext,
TextWriter writer)
at Mvc.Mailer.StringResult.ExecuteResult(ControllerContext context)
at Mvc.Mailer.StringResult.ExecuteResult(ControllerContext context,
String
mailerName)


Reply to this email directly or view it on
GitHubhttps://github.com/smsohan/MvcMailer/issues/74.


Reply to this email directly or view it on GitHub (
https://github.com/smsohan/MvcMailer/issues/74#issuecomment-11574394).


Reply to this email directly or view it on
GitHubhttps://github.com/smsohan/MvcMailer/issues/74#issuecomment-11574984.

— Reply to this email directly or view it on GitHub (https://github.com/smsohan/MvcMailer/issues/74#issuecomment-11575041).

solrevdev commented 11 years ago

we've figured it out :)

worked on mono and mono develop and it works when run under visual studio on iis express or iis.

all gravy

On 20 Dec 2012, at 14:23, SM Sohan notifications@github.com wrote:

Thanks John. Do you have an SMTP server on your local? Can you see if its running at the specified port as in web.config?


Sent from my iPhone Sohan SM

On 2012-12-20, at 7:20 AM, solrev notifications@github.com wrote:

thanks for such a fast response. its for all views. they actually work ok on appharbor its just locally they don't work.

i've asked my colleague john to strip down and get a reproducible example we can zip up and send so you have more info.

awesome project by the way. really nice.

thanks for your help.

John Smith

On Thursday, 20 December 2012 at 14:02, SM Sohan wrote:

Can you paste your view file? Looks like its an issue with the razor view file.


Sent from my iPhone Sohan SM

On 2012-12-19, at 11:35 PM, solrev <notifications@github.com ( mailto:notifications@github.com notifications@github.com < notifications@github.com>)> wrote:

at Microsoft.VisualStudio.WebHost.Request.GetRemoteAddress() at System.Web.HttpWorkerRequest.IsLocal ( http://Web.HttpWorkerRequest.IsLocal)() at System.Web.HttpRequest.get_IsLocal (http://Web.HttpRequest.get_IsLocal)()

at System.Web.HttpRequestWrapper.get_IsLocal ( http://Web.HttpRequestWrapper.get_IsLocal)() at System.Web.WebPages.WebPageHttpHandler.ShouldGenerateSourceHeader ( http://Web.WebPages.WebPageHttpHandler.ShouldGenerateSourceHeader)(HttpContextBase

context) at System.Web.WebPages.WebPageBase.ExecutePageHierarchy ( http://Web.WebPages.WebPageBase.ExecutePageHierarchy)() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy ( http://Web.Mvc.WebViewPage.ExecutePageHierarchy)() at System.Web.WebPages.StartPage.RunPage ( http://Web.WebPages.StartPage.RunPage)() at System.Web.WebPages.StartPage.ExecutePageHierarchy ( http://Web.WebPages.StartPage.ExecutePageHierarchy)() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy ( http://Web.WebPages.WebPageBase.ExecutePageHierarchy)(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.Mvc.RazorView.RenderView ( http://Web.Mvc.RazorView.RenderView)(ViewContext viewContext, TextWriter writer, Object instance) at System.Web.Mvc.BuildManagerCompiledView.Render ( http://Web.Mvc.BuildManagerCompiledView.Render)(ViewContext viewContext, TextWriter writer) at Mvc.Mailer.StringResult.ExecuteResult(ControllerContext context) at Mvc.Mailer.StringResult.ExecuteResult(ControllerContext context, String mailerName)

— Reply to this email directly or view it on GitHubhttps://github.com/smsohan/MvcMailer/issues/74.

— Reply to this email directly or view it on GitHub ( https://github.com/smsohan/MvcMailer/issues/74#issuecomment-11574394).

— Reply to this email directly or view it on GitHubhttps://github.com/smsohan/MvcMailer/issues/74#issuecomment-11574984.

— Reply to this email directly or view it on GitHubhttps://github.com/smsohan/MvcMailer/issues/74#issuecomment-11575041.