asp.net mvc - .NET MVC Custom Mail Server -


i'm in process of planning development of mail-server hand sending of email across our multiple websites. below description of planning implement , i'd opinion/suggestions.

we use asp.net mvc , have many web-sites hosted on azure. send mail internally within each of web applications using smtpserver.send(). not ideal way send emails when have decently busy set of websites because send mail call blocking , cannot guarantee mails sent. i'm worried out getting influx of mail requests when launch our next website (we think it'll decent amount of traffic , lots of emails sent).

my plan of action : build centralised mail-server runs in background (we use azure , web-application). when each 1 of our web applications wants send mail, instead of doing internally, it'll call web method on mail-server called sendmail() function accept parameters , insert mail parameters, content etc. database. mail server poll database @ fixed time intervals, select set of unsent emails , attempt send them using same smtpserver.send() function. if email fails reason won't flag sent , in next poll interval email selected again , send attempt made. (we cap number of send attempts 20).

this allow each of websites run smoothly without having loads of blocking send mail calls internally , mail server handle sending sequentially , in controlled environment separate standalone web-application. in advance!

looks design, don't know entire scenario let building email server. problem has been solved using service exist office 365.

your design good, suggestions following,

you can use azure webjobs build polling agent. can make web job run scheduled web job polling , sending mail , can written clean simple console app.

you can use azure api app build sendmail() call , can use azure ad auth on api authenticate caller of api using authentication , authorization feature secure email server. you can enable cors easily make sure receive requests other websites , process it.

some issues foresee you,

  1. volume , scaling : can process email between each polling. if cannot need create polling agent making things complicated need know picking different sets of emails send. if volume going low should fine.
  2. challenge : why can't websites send mail them selves ? , record on database tracking. have build module or component use on web page create , send mail. polymer 1.0 works scenario.

hope helps started.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -