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
585 stars 176 forks source link

Support for MVC 5 / MVC 5.1? #122

Open spacecat opened 10 years ago

spacecat commented 10 years ago

Hi Sohan, I was wondering if this package works with MVC 5/MVC 5.1 that was recently released (a couple of weeks ago). If not, will there be an update? I'm building and e-commerce site that will launch this summer, hopefully, and got some emails the app needs to send. By the way, I love how this project looks and can't wait to try it out (tomorrow). Also, I really liked Scott Hanselmans blogpost about it.

DaveNavarro commented 10 years ago

Hello,

Not sure about MVC 5.1, but I have it working well in MVC 5 and I don't have any reasons to suspect 5.1 will give us any troubles.

~ Dave .... .- ...- . .- -. .. -.-. . -.. .- -.--

From: spacecatmailto:notifications@github.com Sent: ?Saturday?, ?February? ?8?, ?2014 ?7?:?38? ?AM To: smsohan/MvcMailermailto:MvcMailer@noreply.github.com

Hi Sohan, I was wondering if this package works with MVC 5/MVC 5.1 that was recently released (a couple of weeks ago). If not, will there be an update? I'm building and e-commerce site that will launch this summer, hopefully, and got some emails the app needs to send. By the way, I love how this project looks and can't wait to try it out (tomorrow). Also, I really liked Scott Hanselmans blogpost about it.

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

smsohan commented 10 years ago

Thanks guys. If you find any specific issue on 5.1, I can take another look. Please keep me posted.


Sent from my iPhone Sohan SM

On Feb 8, 2014, at 8:42 AM, David Navarro notifications@github.com wrote:

Hello,

Not sure about MVC 5.1, but I have it working well in MVC 5 and I don't have any reasons to suspect 5.1 will give us any troubles.

~ Dave .... .- ...- . .- -. .. -.-. . -.. .- -.--

From: spacecat<mailto:notifications@github.com notifications@github.com> Sent: ?Saturday?, ?February? ?8?, ?2014 ?7?:?38? ?AM To: smsohan/MvcMailermailto:MvcMailer@noreply.github.comMvcMailer@noreply.github.com

Hi Sohan, I was wondering if this package works with MVC 5/MVC 5.1 that was recently released (a couple of weeks ago). If not, will there be an update? I'm building and e-commerce site that will launch this summer, hopefully, and got some emails the app needs to send. By the way, I love how this project looks and can't wait to try it out (tomorrow). Also, I really liked Scott Hanselmans blogpost about it.

Reply to this email directly or view it on GitHub< https://github.com/smsohan/MvcMailer/issues/122>.

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

smsohan commented 10 years ago

Guys, here's the new build. Please give it a try and let me know if it works as expected. I don't have VS 2013 installed on my machine, so it's a bit hard for me to try this build. https://www.nuget.org/packages/MvcMailer-vs2013/4.5.1-pre

spacecat commented 10 years ago

The Package Manager Console still gives me errors. I opened VS2013 as administrator. Created a default MVC 5.1 web app. Ran this command: Install-Package MvcMailer-vs2013 -Pre This is what I get:

Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

Package Manager Console Host Version 2.7.41101.371

Type 'get-help NuGet' to see all available NuGet commands.

PM> Install-Package MvcMailer-vs2013 -Pre Attempting to resolve dependency 'T4Scaffolding.Core (≥ 1.0.0-vs2013)'. Installing 'T4Scaffolding.Core 1.0.0'. Successfully installed 'T4Scaffolding.Core 1.0.0'. Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE At C:\users\x\documents\visual studio 2013\Projects\WebApplication26\packages\T4Scaffolding.Core.1.0.0\tools\init.ps1:50 char:30

Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE At C:\users\x\documents\visual studio 2013\Projects\WebApplication26\packages\T4Scaffolding.Core.1.0.0\tools\init.ps1:51 char:30

Installing 'MvcMailer-vs2013 4.5.1-pre'. Successfully installed 'MvcMailer-vs2013 4.5.1-pre'. Adding 'T4Scaffolding.Core 1.0.0' to WebApplication26. Successfully added 'T4Scaffolding.Core 1.0.0' to WebApplication26. Adding 'MvcMailer-vs2013 4.5.1-pre' to WebApplication26. Successfully added 'MvcMailer-vs2013 4.5.1-pre' to WebApplication26. Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE At C:\users\x\documents\visual studio 2013\Projects\WebApplication26\packages\MvcMailer-vs2013.4.5.1-pre\tools\Install.ps1:23 char:22

---------------------------READ ME---------------------------------------------------

Your default Mailer Scaffolder is set to Mailer.Razor

You can generate your Mailers and Views using the following Scaffolder Command

PM> Scaffold Mailer UserMailer Welcome,GoodBye

Edit the smtp configuration at web.config file before you send an email

You can find more at: https://github.com/smsohan/MvcMailer/wiki/MvcMailer-Step-by-Step-Guide


PM>

oscarmathew commented 10 years ago

Hi,

I've got the MVC 5.1 working with the MVC Mailer on VS2013 Express Web. First of all, I uninstalled the MVC.Scaffolding and all the T4Scaffolding packages. Then I restarted the VS in admin mode, and I tipped "Install-Package MvcMailer-vs2013 -Pre " in the packages console, at the same time it is installed the "T4Scaffolding.Core" version="1.0.0-vs2013" automaticly. In that moment, you'll see in packages the two next entries:

id="T4Scaffolding.Core" version="1.0.0-vs2013" targetFramework="net45" id="MvcMailer-vs2013" version="4.5.1-pre" targetFramework="net45"

IMPORTANT: You must have the " Windows Management Framework 3.0" installed.

Hope it helps.

spacecat commented 10 years ago

wmf with powershell 3? Yea, had to install that to get mvcscaffolding nugget package working. I am running win 7 ultimate 64 bit FYI.

14 feb 2014 kl. 10:28 skrev oscarmathew notifications@github.com:

Hi,

I've got the MVC 5.1 working with the MVC Mailer on VS2013 Express Web. First of all, I uninstalled the MVC.Scaffolding and all the T4Scaffolding packages. Then I restarted the VS in admin mode, and I tipped "Install-Package MvcMailer-vs2013 -Pre " in the packages console, at the same time it is installed the "T4Scaffolding.Core" version="1.0.0-vs2013" automaticly. In that moment, you'll see in packages the two next entries:

IMPORTANT: You must have the " Windows Management Framework 3.0" installed.

Hope it helps.

— Reply to this email directly or view it on GitHub.

oscarmathew commented 10 years ago

Win7 Pro SP1 64bit in mi case. It already works?

spacecat commented 10 years ago

Ok. Forgot to mention SP1/SP2 whichever is the latest.

14 feb 2014 kl. 10:54 skrev oscarmathew notifications@github.com:

Win7 Pro SP1 64bit in mi case. It already works?

— Reply to this email directly or view it on GitHub.

jamesbascle commented 10 years ago

Here's a list of things I've done, in order, to make this work with MVC 5.1.1, starting from an MVC 5.0.0 project:

EDIT: Do all of this with VS2013 running in Administrator Mode

1) Install WMF 4.0 2) Uninstall any scaffolding stuff from project 3) Add T4Scaffolding pre-release via "Install-Package T4Scaffolding.Core -Version 1.0.0-vs2013 -Pre" 4) Add VS2013 branch of MvcMailer via "install-package MvcMailer-vs2013 -pre" 5) Make sure you can scaffold MvcMailer stuff 6) Update version of MVC to 5.1.1 via NuGet management on solution - if you try to scaffold MVC stuff here, you will get a scaffolding error. 7) Restart Visual Studio. 8) Attempt to scaffold both MVC and MvcMailer stuff here. It should work!

I think starting from a 5.1.1 project should be similar, without the upgrade of MVC via nuget.

mattwoberts commented 10 years ago

Just confirmed that the steps above work OK for VS2013 Update 2 for me.

One important point:

1) Install WMF 4.0

To do this in windows 8, go to add/remove windows features and make sure you've got "Windows Identity Foundation 3.5" ticked.

sebastianbk commented 9 years ago

I am still having this issues, even with after trying all of the suggested solutions. Is there any update on this?

arielmoraes commented 9 years ago

I had to change the property MailerName to return the name of the class without the Controller string.

liamweston commented 9 years ago

I'm having the same problem. It seemed to work after I switched to the vs2013 -pre versions but I'm back to not being able to add controllers due to scaffolding errors again.

@arielmoraes - can you provide an example of your solution please?