![]() ![]() Mail.to.add(new mailaddress(torecipient)) String torecipients = vm.torecipients.split(',') įoreach (string torecipient in torecipients) om = new mailaddress(configurationmanager.appsettings) String password = configurationmanager.appsettings Smtpclient smtpserver = new smtpclient() Public httpresponsemessage sendmail(emailconfigdetailsvm vm) If namespace are missing in your project then add to use nuget package manager. if you've done it properlyl, “sendmailapicontroller” will appear. now, add scaffold and create as api controller. >right click on controllers-> add controller. Once the project is created, add a new api in the controllers folder. go to new project-> select visual c# -> web and choose the project type, asp.net web application, in the pop-up.įrom the pop-up, given below, we will select the web api template. web api perfectly supports http verbs (get, post, put, delete). ![]() Web api can be used anywhere in a wide range of client applications (windows and web), mobile devices, and browsers. ![]() http is simple, flexible, and ubiquitous. it is also a powerful platform to build restful (representational state transfer) apis that expose services and data. Web api is similar to asp.net mvc, so it contains all of mvc's features. net framework, which makes it easy to build http services that comprise of a range of clients, including mobile devices, web browsers, and desktop applications. Asp.net web api is a framework to build web apis on top of the. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |