Public feed #723886

Miscellany

public text v1 · immutable
Raw Edit
·published 2007-10-03 03:10 UTC
rendered paste body
foreach($emails as $email) {
				$email = trim($email);
				
				$headers  = 'MIME-Version: 1.0' . "\r\n";
				$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
				$headers .= 'From: '.$wgUser->getRealName().' <'.$wgUser->getEmail().'>' . "\r\n";
				$message = <<<HERE
<html>
<head>
<title>WikiBon Invitation</title>
</head>
<body>
<p>You have received an invitation from {$wgUser->getRealName()} to .</p>
<br />
<p>{$_POST['message']}</p>
<br />
<p>To join the Open Source Think Tank, <a href='http://www.wikibon.org/index.php?title=Special:Userlogin&returnto=Home'>register here</a>.</p>
</body>
</html>
HERE;
				
				if (mail($email, "WikiBon Invitation", $message, $headers)) {
					$output = "Mail Sent";
				} else {
					$output = "There was an error.";
				}
			}