asp.net mvc - Is it possible to run mvc mailer from a separate project -


i'm running mvc website alongside webapi , i'm looking building in email functionality.

i have lightweight controllers abstracting of logic away service layer it's big application , want make of reusable between mvc , webapi.

that's putting me off using mvcmailer because examples running within web project. if phone app written used webapi wouldn't able make use of email functionality.

i'm wondering if it's possible run it's own project? here's crude depiction of i'm trying do.

myproject.web   myproject.webapi          \          /           \        /       myproject.services               |               |        myproject.email 

can abstract away either mvcmailer or actionmailer technically both .web , .webapi both mvc4 projects?

if not use standalone version of actionmailer.net or equivalent in postal though functionality bit cut down.


edit: more info

thinking bit more seems tricky because i'd have fancy copy logic email views deploy both mvc , webapi website automatically.

perhaps better separate email it's own website , have services layer make web requests send emails , abstract away.

myproject.web   myproject.webapi          \          /           \        /       myproject.services  --http-->  myproject.email 

i guess way have email deployed on 1 server rather having have smtp set on of them. comments welcome


related questions

as mentioned in question created separate email project bare bones webapi project.

myproject.web   myproject.webapi          \          /           \        /       myproject.services  --http-->  myproject.email 

i send emails through rest service email webapi.


note:

i believe might possible internally in service layer using razor generator. create mvc project called email never run directly, , include in web project reference.

this give benefits of intellisense compile email views code using razor generator.

the downside approach if have multiple web servers have have smtp service installed on of them.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -