function mailform($mailto, $subj, $messageID,
$unsubcode, $accountID){
//define values to use to format the email
$unsubLink="http://funwebdev.com/unsub.php?id=$unsubcode
&userID=$accountID";
$trackURL="http://funwebdev.com/msg=$messageID
&userID=$accountID";
$trackImg="http://funwebdev.com/img.php?msg=$messageID
&userID=$accountID";
//unique boundary string
$bound = uniqid("FUNWEBDEV_MAIL_EXAMPLE");
$rn = "\r\n";
// define a plain (no HTML) footer to illustrate tracking
// link inclusion.
$plainfooter="$rn$rn$trackURL$rn$rn"; $plainfooter.="---------------------$rn";
$plainfooter.="To unsubscribe from this campaign, please click the
following link.$rn";
$plainfooter.=$unsubLink;
//now define an HTML version of the footer to illustrate web bugs
$htmlfooter="
funwebdev.com"; //hidden image.
$htmlfooter.=""; $htmlfooter.="
To unsubscribe from this campaign, please click the following link.
"; $htmlfooter.="$unsubLink"; // Override SMTP headers $headers='From: System Administrator