0
I’m having trouble sending an email template. I have the following page :
<?php session_start();  ?>
Contact - Piscouachou Email sent successfully !
    <section id="conteudo">
        <p>
            Obrigado por utilizar o contato Piscou achou, o estabelecimento já ira entrar em contato com você.</br></br>
            Caso queira um contato mais direto visite a pagina www.piscouachou.com.br
            e clique em ver telefone na pagina do estabelecimento.</br></br>
            Estabelecimento: <?php echo $_SESSION['nomeE']; ?></br>
            ID: Estabelecimento: <?php echo $_SESSION['idE']; ?>
        </p>
    </section>
    <section id="imagem">
        <img src="img/separador.png" alt="">
    </section>
    <div id="public">
    <section id="estabelecimento">
        <h2>· Estabelecimento ·</h2>
        <h4>Ainda não é assinante?</h4>
        <p>
            Entre em contato:</br>
            email: [email protected]</br>
            telefone: 11 4107-5077
            </br>
            </br>
        </p>
        <a href="http://www.piscouachou.com.br/contato.php" class="css_btn_class">Piscou Achou</a>
       </section>
    <section id="grupoemais">
        <h2>· Grupo Emais·</h2>
        <h4>Conhece nossos serviços?</h4>
        <p>
            Grupo Emais é composto por 4 empresas que oferecem suporte às corporações
            em tudo o que diz respeito à comunicação.
            </br>
            </br>
        </p>
        <a href="http://www.grupoemais.com.br/" class="css_btn_class2">Grupo Emais</a>
    </section>
    </div>
</div>
I was trying to include this page on a page with the values of $_SESSION updated, but when I send the email the images do not appear and the values of SESSION do not work.
I am using PHPMAILER.
$Vdata = file_get_contents('EmailEmais');
$mail -> body = $Vdata;
I would put Emailemais.php in the $name ??
– Kaue Alves
No, within that function
geraHtml(), in the variable$htmlyou put your HTML text, and pass as a parameter to the function what will replace the variables in your HTML, for example :$_SESSION['nomeE'], this way you don’t get so dependent on Ssion– Lucas Queiroz Ribeiro
@Kauealves Editei
– Lucas Queiroz Ribeiro
Thank you very much I got here !!
– Kaue Alves