Im having hard time formatting the message of the body for the external API to create ticket and Im using laravel. Im not sure if doing it correctly.

Appreciate for any help. Thank you.

code in controller:
$htmlBody = '<html>';
$htmlBody .= '<body>';
$htmlBody .= '<p>Division Name: ' . $inqdata->office_name. '</p>';
$htmlBody .= '<p>Requester Name: ' . $inqdata->requester_name . '</p>';
// Include other relevant information from the response
$htmlBody .= '</body>';
$htmlBody .= '</html>';

output:

<title>Support Request</title>
<h1>Support Request</h1>
<p>Division Name: Manile</p>
<p>Requester Name: Chloe Jane</p>

    tags are being included in the ticket thread like this.

    <title>Support Request</title>
    <h1>Support Request</h1>
    <p>Division Name: Manile</p>
    <p>Requester Name: Chloe Jane</p>

    format should be like this:

    Support Request

    Support Request

    Division Name: Manile
    Requester Name: Chloe Jane

      emma_galvez

      What format are you using? I would assume JSON. If so, the documentation shows an example of how to pass HTML in the message:

      "message": "data:text/html,MESSAGE <b>HERE</b>",

      Cheers.

      Write a Reply...