python ruby-programming-language Smalltalk Vue.js Knockoutjs TypeScript JavaScript, OOPs JavaScript Angular 7, Interview Questions Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 4 Angular 2 AngularJs 1.x NodeJs Perl Programming R Programming RequireJs Rust Programming Backbonejs closure programming language go-programming-language kotlin-programming-language
send email using JavaScript

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 support team with error details.
   var mesgDetails = 'mailto:s[email protected]?subject=' + 'UserName : ' + username
            + '  ||  SubscriptionId : ' +subscriptionId
    + '&body=' + 'UserName : ' + username
                   + ',  SubscriptionId : ' + subscriptionId
                   + ',  RequestURL : ' + requestURL
                   + ',  Error Message : ' + internalErrorMsg;

   window.location.href= mesgDetails;  return;

Notes: After click on Send Report open to default email(Outlook) per-populated  To: [email protected] 

Subject : UserName : [email protected] || SubscriptionId : sub001

Body : UserName : [email protected]SubscriptionId : sub001,
          RequestURL : ''
          Error Message : ''value' is null or not an object'


Hi there! Welcome to my blog. My name is Anil Singh. I'm a author of this blog. For more detail about me, kindly refer to this link..
My Blogs - and
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like Powered by Blogger.
ASK Questions