Share Pastebin
Guest
Public paste!

Exemplo VAB

By: a guest | Mar 18th, 2010 | Syntax: PHP | Size: 0.58 KB | Hits: 82 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. <?php
  2. $db = mysql_connect("dbmy0017.whservidor.com","newsletter","000000");
  3. $banco = mysql_select_db("newsletter",$db);
  4.  
  5. $de        = $_POST['de'];
  6. $assunto   = $_POST['assunto'];
  7. $msg       = $_POST['codigo'];
  8. $cabecalho  = "MIME-Version: 1.0\r\n";
  9. $cabecalho .= "Content-type: image/jpeg\r\n";
  10. $cabecalho .= "Content-type: text/html; charset-iso-8859-1\r\n";
  11. $cabecalho .= "From: $de";
  12.         $sql = mysql_query("SELECT * FROM email");
  13.         while($linha = mysql_fetch_array($sql)) {
  14.                 mail($linha['email'], "$assunto", $msg, $cabecalho);
  15.         }
  16. header("Location: form_envia.php");
  17.                
  18. ?>