Jump to content
Fórum Script Brasil
  • 0

Duvida com email



ola amigos tudo beleza?

estou tentano pegar os emails cadastrados no bd e com um formulario enviar uma mensagem a todos q vem estao no bd, problema e q não esta enviano os emails =/

ta assim o codigo

<div id="conteudo">
<div id="boxplayer">
<h1>Bem vindo Admin</h1>

<div id="menu_pl">
<?php include "menu_admin.php"; ?>
</div><!-- menu player-->
<div id="boxplayerdr">
<h1>Enviar Email</h1>
<br />


include "conecta.php";

$pegamail= mysql_query("SELECT email FROM cadastrado ");
    while($lista = mysql_fetch_array($pegamail)){

$p_email = $lista['email'];

$formato = "\nContent-type: text/html; charset=utf-8";
    $email = "[email protected]";
    //$assunto = "Solicitação de suporte";
    $tdemail = $_POST['email'];
    $msg = $_POST['msg'];
    mail("$tdemail", "Noticias OE", $msg, "from:$email".$formato );    
<form method="post" action="" style="margin:10px 90px;">
<input type="text" name="email" value="<?php echo $p_email; ?>" />
<span style=" font:16px Arial, Helvetica, sans-serif; color:#DFDBDC;">Mensagem</span><br />

<textarea cols=40 rows=10 name='msg' ></textarea><br />
<input type="submit" name="enviar" value="Enviar" />

</div><!-- fecha bemvindo -->

</div><!-- fecha conteudo -->

o que sera q esta haveno sera q não esta pegano os emails do bd ? vlw ajuda

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

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

Answer this question...

×   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.


  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...