Skip to main content

Posts

Showing posts with the label send email using JavaScript

How Send Email with Attached file in ASP.NET MVC 5?

Table of Contents – 1.      Create a new Model Class in the model 2.      Create a new Home Controller in the Controller 3.      Create a new Email Action with HttpPost method in the Home Controller 4.      Create a HTML UX Page 5.      Return Email Sent msg -Email has been sent successfully! 6.      Result Stayed Informed – MVC Interview Q/A Steps  -  Create a new Email Model Class in the model - namespace SendEmailwithAttchedFile . Controllers {     public class EmailModel     {         public string To { get ; set ; }         public string Subject { get ; set ; }         public string Body { get ; set ; }     } } Create a new Home Controller in the Contro...

send email using JavaScript

I am going to share the code sample for  send email using JavaScript in MVC 5 Today's, I have a requirement to send the error report by default email in all browsers using JavaScript. In the 1st step , Write the JavaScript code sample.  $( '.div_confimpopup' ).find( '.btn_SendReport' ).click( function () { //Need to send the error detail to dotnetsql.in support team with error details.    var mesgDetails = 'mailto:support@dotnetsql.in?subject='  + 'UserName : ' + username             + '  ||  SubscriptionId : ' +subscriptionId     + '&body='  + 'UserName : ' + username                    + ',  SubscriptionId : ' + subscriptionId                    + ',  RequestURL : ' + requestURL                 ...