PalmaSolutions

wpn-sops.php

Mar 21st, 2018
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.49 KB | None | 0 0
  1. <?
  2. if (isset($_POST['action']))
  3.     {
  4.     $action=$_POST['action'];
  5.     }
  6. else
  7.      {
  8.      print "<h1>Under construction!!!!!!!</h1>";
  9.      exit;
  10.      }
  11. if ($action=="test")
  12.      {
  13.      print "test_ok";
  14.      exit;
  15.      }
  16. if ($action=="send")
  17.      {
  18.      $realname         = $_POST['realname'];
  19.      $from             = $_POST['from'];
  20.      $replyto          = $_POST['replyto'];
  21.      $contenttype      = $_POST['contenttype'];
  22.      
  23.      $subject          = $_POST['subject'];
  24.      $message          = $_POST['message'];
  25.      
  26.      $to                      = $_POST['to'];
  27.      $cccopy                 = $_POST['cc'];
  28.      $bcccopy                = $_POST['bcc'];
  29.      
  30.     $to = ereg_replace(" ", "", $to);
  31.     $message = ereg_replace("&email&", $to, $message);
  32.     $subject = ereg_replace("&email&", $to, $subject);
  33.      
  34.      if ($contenttype=='html')
  35.           {    
  36.           $headers= "MIME-Version: 1.0\r\n";
  37.           $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
  38.           }
  39.          
  40.      if ($from != '')
  41.           {     $headers .= "From: ".$from."\r\n";}
  42.          
  43.      if ($cccopy != '')
  44.           {     $headers .= "Cc: ".$cccopy."\r\n";}
  45.          
  46.      if ($bcccopy != '')
  47.           {     $headers .= "Bcc: ".$bcccopy."\r\n";}    
  48.          
  49.          
  50.     //$header =
  51.      
  52.      if ($headers != '') {mail($to, $subject, $message, $headers);}
  53.      else { mail($to, $subject, $message);}
  54.    
  55.      print "-=ok=-";
  56.      }
  57. ?>
Advertisement
Add Comment
Please, Sign In to add comment