ok mira este codigo que encontre pero no me esta funcionando
Código PHP:
Ver original<?php
$host = "localhost";
$user = "user_name";
$pass = "password";
$db = "domains";
$startdate = date("Y-m-d"); $enunmes = explode ( "-", $startdate ); $sumaunmes = mktime ( 0, 0, 0, date( $enunmes[1]), date($enunmes[2]+ 1), date($enunmes[0]) ); $expiredate = date ("Y-m-d", $sumaunmes);
$query="SELECT domain_name FROM domains WHERE exp_date > $expiredate ORDER BY domain_name ASC";
$i=0;
while ($i < $num) {
$subject = 'Domain renewall reminder';
$message = '
The following domains will expire in 7 days
<BR><BR>
$domain_name - $company_name<BR>
<BR><BR>
Dont forget to renew!<BR><BR>
Domain Team
';
mail($to, $subject, $message, $headers); ?>