1

I have javascript api to send email in which I can also use html, so I am creating table inside it but it is not working and tables does not show. Here is my code:

<script>
    $(document).ready(function(){
        $("#commandEmail1").click(function() {
            presenter.command("emailSend",{
                "toEmail": "[email protected]",
                "toName": "Celeritas",
                "subject": "email test",
                "body": "Single Attachment",
                "bodyHtml":"<table width="200" border="1"><tr><td>&nbsp;</td><td>&nbsp;</td> </tr><tr> <td>&nbsp;</td><td>&nbsp;</td> </tr></table>",
                 "attachments": [""]
            });
            return false;
        });
    })
</script>

2 Answers 2

1

use single quotes inside double quotes

"<table width='200'...

or you can replace double quotes inside with &quot;

Sign up to request clarification or add additional context in comments.

Comments

0

Code should be like this.. You have used double quotes..

$(document).ready(function(){


$("#commandEmail1").click(function() {


presenter.command("emailSend",{
    "toEmail": "[email protected]",
    "toName": "Celeritas",
    "subject": "email test",
    "body": "Single Attachment",


 "bodyHtml":"<table width='200' border='1'><tr><td>&nbsp;</td><td>&nbsp;</td> </tr><tr> <td>&nbsp;</td><td>&nbsp;</td> </tr></table>
              ",
       "attachments": [""]
         });
     return false;
         });
         })

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.