Mail Delivery Engine

'); function ln_split($msg,$ln_len) { if ($tmp_fn = tempnam("/tmp","lns_")) { if ($f = fopen($tmp_fn,"w")) { fwrite($f,$msg); fclose($f); $frd = popen("/usr/local/bin/ln_split ".$ln_len." < ".$tmp_fn,"r"); if ($frd) { $rmsg=""; while ($aline=fgets($frd,255)) { $rmsg=$rmsg.$aline; } } unlink($tmp_fn); } } return $rmsg; } if ($check_referal) { $mustbefrom="http://www.rovingpen.com/"; $mbflen=strlen($mustbefrom); if ( substr($HTTP_REFERER,0,$mbflen) != $mustbefrom ) { die("Invalid referer: \"$HTTP_REFERER\""); } } $sendersname=$_POST['sendersname']; $mailsubj=$_POST['mailsubj']; $mailmsg=$_POST['mailmsg']; $mailreplyto=$_POST['mailreplyto']; $mailcc=$_POST['mailcc']; if ( $mailsubj != "" && $mailmsg != "" && $mailreplyto != "" ) { if (get_magic_quotes_gpc()) { $sendersname=stripslashes($sendersname); $mailsubj=stripslashes($mailsubj); $mailreplyto=stripslashes($mailreplyto); $mailmsg=stripslashes($mailmsg); } if ($mailcc == "yes") $mailcc=$mailreplyto; $boundary="mail_MIME_boundary1092837465_x"; $mailhdrs = "Return-Path: support@oakstreetsoftware.com\n"; // Return path for errors $mailhdrs .= "Reply-to: ".$mailreplyto."\n"; $mailhdrs .= "MIME-Version: 1.0\n"; $mailhdrs .= "Content-Type: multipart/alternative; boundary=\"".$boundary."\"\n"; /* insert text version of message */ $mailmsgt = "\n--".$boundary."\nContent-Type: text/plain; charset=us-ascii\n\n"."Senders name: ".$sendersname."\n\n".ln_split($mailmsg,76); /* insert html version of message */ $htmlmsg = nl2br(htmlspecialchars($mailmsg)); $mailmsgh = "\n--".$boundary."\nContent-Type: text/html; charset=iso-8859-1\n\n

Senders name: $sendersname

\n

".$htmlmsg."

\n"; $mailmsgh .= "\n--".$boundary."--\n"; if ($_POST['sm_action'] != "Send Message to RovingPen") { echo("

".nl2br(htmlspecialchars($mailhdrs))."

"); echo("


".$mailmsgt."
"); echo("


$mailmsgh

"); } else { $mailmsg = $mailmsgt.$mailmsgh; $mailto = "rovingpenna@gmail.com"; $result = mail( $mailto, $mailsubj, $mailmsg, $mailhdrs ); if ( $result ) { echo( "

Message delivered

\n" ); } else { echo( "

There was an error delivering message

\n" ); } /* Send out a CC copy if requested */ if ( $mailcc != "" ) { $result = mail( $mailcc, $mailsubj, $mailmsg, $mailhdrs ); } } } else { ?>

A required field was not provided. Close this window, fill in the required fields in the e-mail delivery form, and try again.

\n
\n

\n
\n\n"); } // end Request method == post else { ?>

Send an E-mail message to Darlene Miller of RovingPen.com

Your Name:
Your Email Address:
Subject Line:
Message:
Carbon Copy (CC) yourself on this message