I am trying to add body to an email that i sending through JavaScript. I have a SharePoint list view when clicked on sends an email to EmailID.

This works fine,

var mail="mailto:"+emailID+"?Subject=Test:"+ctx.CurrentItem.ID

I am trying to add body of the email. I have tried

var mail="mailto:"+emailID+"?Subject=Test:"+ctx.CurrentItem.ID&body=Test


var mail="mailto:"+emailID+"?Subject=Test:"+ctx.CurrentItem.ID;body=Test. 

Nothing worked.

Can anyone please suggest.

1 Answer 1


Looks like an issue with double quotes.

Try it as below:

var mail= "mailto:" + emailID + "?Subject=Test: " + ctx.CurrentItem.ID + "&body=Some body text";

If you want a dynamic body text, try it as below:

var bodyText= "some body text";
var mail= "mailto:" + emailID + "?Subject=Test: " + ctx.CurrentItem.ID + "&body=" + bodyText;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.