var subjectText = encodeURIComponent(document.title); window.location = 'mailto:' + $('#email').val() +'?body='+ window.location.href +'&subject= '+ subjectText;