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.
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
+ ', Error Message : ' + internalErrorMsg;
});
Notes: After click on Send Report open to default email(Outlook) per-populated To: support@dotnetsql.in
Subject : UserName : anil.singh@dotnetsql.in || SubscriptionId : sub001
Body : UserName : anil.singh@dotnetsql.in, SubscriptionId : sub001,
RequestURL : 'http://www.code-sample.com/2013/08/send-email-using-javascript.html'
Error Message : ''value' is null or not an object'
Subject : UserName : anil.singh@dotnetsql.in || SubscriptionId : sub001
Body : UserName : anil.singh@dotnetsql.in, SubscriptionId : sub001,
RequestURL : 'http://www.code-sample.com/2013/08/send-email-using-javascript.html'
Error Message : ''value' is null or not an object'