All pastes #185456 Raw Edit

vegbox444

public php v1 · immutable
#185456 ·published 2006-09-28 23:31 UTC
rendered paste body
# To Email Address$eol = "\n";$emailaddress = $address;# Message Subject$emailsubject = "Welcome to the Young Inventors Hub Mailing List!";# Message Bodyob_start();# Open File with Message body!require("includes/mailinglist_message.html");$body=ob_get_contents(); ob_end_clean();# Common Headers$headers .= 'From: Young Inventors Hub <info@younginventorshub.com>'.$eol;$headers .= 'Reply-To: Young Inventors Hub <info@younginventorshub.com>'.$eol;$headers .= 'Return-Path: Young Inventors Hub <info@younginventorshub.com>'.$eol;    // these two to set reply address$headers .= "Message-ID: <".$now." info@".$_SERVER['SERVER_NAME'].">".$eol;$headers .= "X-Mailer: PHP v".phpversion().$eol;$mime_boundary=md5(time());$headers .= 'MIME-Version: 1.0'.$eol;$headers .= "Content-Type: multipart/related; boundary=\"".$mime_boundary."\"".$eol;# HTML Version$msg .= "--".$mime_boundary.$eol;$msg .= "Content-Type: text/html; charset=iso-8859-1".$eol;$msg .= "Content-Transfer-Encoding: 8bit".$eol;$msg .= $body.$eol.$eol;# Finished$msg .= "--".$mime_boundary."--".$eol.$eol;  // finish with two eol's for better security. see Injection.# SEND THE EMAILini_set(sendmail_from,'info@younginventorshub.com');  // the INI lines are to force the From Address to be used !  mail($emailaddress, $emailsubject, $msg, $headers);ini_restore(sendmail_from);