Jump to content

Error in API Documentation for 'sendadminemail' command


websavers

Recommended Posts

The documentation indicates that the ticket ID merge field variable is $ticket_id, however it is actually $ticket_tid.

 

Therefore the following two lines should be adjusted, the first one for External API and the second for Internal:

 

 $postfields["mergefields[ticket_id]"] = "1";

 

should be

 

 $postfields["mergefields[ticket_tid]"] = "1";

 

and

 

    "ticket_id" => 1,

 

should be

 

    "ticket_tid" => 1,

 

---

 

Also, the actual ticket message is sent in plaintext and not HTML so one of the following two actions should be taken:

 

1. WHMCS should automatically run nl2br() on the $ticket_message variable before sending the email OR

2. The documentation should show the use of nl2br() in some way. For example:

 

$postfields["mergefields[ticket_message]"] = nl2br("This is a test ticket");

 

Cheers,

 

Jordan

Edited by jas8522
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated