Hi,
I sometimes need to send multiple emails with slightly different content to the same recipient. I use this simple script:
<?
$textvp = file("file2.txt");
$total = count($textvp);
for ($i = 0; $i < ($total); $i++)
{
$nsmail= "
Hi,
The word you are looking for is ".$textvp[$i].".
With kind regards,
W.
";
mail('info@recipient.com','',$nsmail);
// mail('info@myemail.com','',$nsmail);
}
?>
I save this as a .php file, put it on my server together with file2.txt containing the words, and load it - works just fine.
Now I want to warn 10 costumers that their domain is expiring. Each of them should receive an email (ideally with the subject "Your domain example.com is expiring soon" saying:
Dear costumer,
The domain example.com, which you registered with us, is expiring soon. If you want to keep it please be sure to renew it.
With kind regards,
W.
Of course, example.com should be replaced with the email of the recipient, both in the subject line as well as in the mail itself. How do I do this using more or less the same method as I usually use?
Thanks in advance...