Estou desenvolvendo uma integração para enviar email dentro do Sendinblue, porém na requisição é necessario enviar o código HTML do email e só funciona se eu colocar "\\" na frente de todas as aspas duplas.
Preciso pegar o HTML que está assim:
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head> <meta http-equiv="Content-Type" content="text/html;
> charset=utf-8" /> <title>Email para Divulção de Produto</title>
> <style type="text/css"> .corpo1 { margin-left:auto;
> margin-right:auto; width:700px; height:auto; } .produtos {
> width:340px; height:405px; float:left; } .tituloproduto { font-family:
> Verdana, Geneva, sans-serif; font-size:14px; font-style:oblique; }
> .preheader { color:#c0c0c0; font-family: arial, helvetica, sans-serif;
> font-size: 12px; } </style> </head> <body> <div align="center">
> <!-- Tabela do Corpo do Email --> <table class="corpo1"
> width="95%" border="0" cellspacing="1"
> cellpadding="1"> <!-- Pre Header --> <tr align="center">
> <td class="preheader"> Ofertas para Acabar com os Estoques </td>
Exemplificando preciso declar assim:
> "<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\">
> <head> <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;
> charset=utf-8\\\" /> <title>Email para Divulção de Produto</title>
> <style type=\\\"text/css\\\"> .corpo1 { margin-left:auto;
> margin-right:auto; width:700px; height:auto; } .produtos {
> width:340px; height:405px; float:left; } .tituloproduto { font-family:
> Verdana, Geneva, sans-serif; font-size:14px; font-style:oblique; }
> .preheader { color:#c0c0c0; font-family: arial, helvetica, sans-serif;
> font-size: 12px; } </style> </head> <body> <div align=\\\"center\\\">
> <!-- Tabela do Corpo do Email --> <table class=\\\"corpo1\\\"
> width=\\\"95%\\\" border=\\\"0\\\" cellspacing=\\\"1\\\"
> cellpadding=\\\"1\\\"> <!-- Pre Header --> <tr align=\\\"center\\\">
> <td class=\\\"preheader\\\"> Ofertas para Acabar com os Estoques </td>
Peguei só um pedaço do código para simplificar.
Existe alguma função dentro PHP que pegue esse código HTML e transforme no formato JSON?
Obrigado,