Untitled
unknown
php
4 years ago
489 B
11
Indexable
<?php
$from = "Willy Wonka <willy@wonka.com>";
foreach(file('list.txt') as $line)
{
list($email, $name) = explode("\t", $line);
list($firstname) = explode(' ', $name);
$subject = "Hi $firstname! The chocolate is all yours.";
$body = "Hi $firstname —
Those other kids are awful. You deserve it all. Come and get it.
--
Willy Wonka — willy@wonka.com — http://wonka.com
";
mail($email, $subject, $body, $from);
print "$email sent\n";
}
?>Editor is loading...