0

I have created a form which gets copied to outlooks body to send email. I just completed the form and now i noticed that not all the contents in my form are getting copied to my outlooks body.My form has over 100 lines. So I was wondering if its the size that is causing this issue. Below is my code to send email -

 $('.btnSendEmail').click(function (event) {
        var email = 'example@email.com';
        var subject = 'Creation Checklist';
        var emailBody = $('#holdtext').val();
        window.location = 'mailto:' + email + '?subject=' + subject + '&body=' + emailBody;
      });

My initial forms code is here

Community
  • 1
  • 1
Pete
  • 55
  • 1
  • 10
  • I do not know if i can post here again. Sorry If this is wrong. How do i edit the font size in the email body. – Pete Oct 05 '17 at 13:12

1 Answers1

0

You are passing the email parameters through URL which has a limit of 2000 characters, you should use Ajax or server side code to post the form values and redirect to the other page, or just post to it directly.

Haitham Shaddad
  • 4,336
  • 2
  • 14
  • 19
  • I do not know Ajax. – Pete Oct 17 '16 at 03:44
  • Since you are using jQuery, Ajax should not be any difficult, you just use $.ajax('URL',data), or you can just remove the button click handler and include your input controls in a `
    ` tag and make the form post to the other page that has code for the send email
    – Haitham Shaddad Oct 17 '16 at 04:46
  • Could you please provide the Ajax code for the same. Thanks – Pete Oct 18 '16 at 14:07
  • I have already mentioned it in my previous comment `$.ajax('your URL',function(data){//this function will be called when the call is successful })` – Haitham Shaddad Oct 18 '16 at 15:35