Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as PHP by BKing ( 17 years ago )
$to = $address[$temp];
      $subject = "Newsletter";

      $body = $_POST["emailtext"];
      $headers = "From: User <[email protected]>
";
      $headers .= "MIME-Version: 1.0
" . "Content-type: text/html; charset=iso-8859-1";
      $headers .= "Content-Transfer-Encoding: base64

";

      //convert newlines to <br>
      $body = nl2br($body);

      //add html and body tags
      $body = "<HTML><BODY>" . $body . "</BODY></HTML>";

      //find links and convert them to html links
      $pattern = "/(http://[w.]+)/"; 
      $replace = "<a href='$1'>$1</a>"; 
      $body = preg_replace($pattern, $replace, $body); 


      if (mail($to, $subject, $body, $headers))

 

Revise this Paste

Your Name: Code Language: