这个想法是当我的用户离开一天到期时自动发送邮件给我的用户。邮件为什么不自动发送?
$enviar = $datoMesPazysalvo[2] - $ayer;
if($enviar == 1){
$nombre = $row_registroClientes['nombres'] + $row_registroClientes['apellidos'];
$email = $row_registroClientes['correo'];
$telefono = $row_registroClientes['telefono'];
// multiple recipients
$to = '[email protected]' . ', '; // note the comma
$to .= '$email';
// subject
$subject = 'Fight Club Bogota, Información importante!!';
// message
$message = '
<html>
<head>
<title>Fight Club Bogota, Información importante!!</title>
</head>
<body>
<p>Tu matricula vence mañana $datoMesPazysalvo[2]</p>
<span>Ponte en contacto con nosotros para renovar</span>
</body>
</html>
';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: $nombres <$email>, Administrador <[email protected]>' . "\r\n";
$headers .= 'From: Administrador <[email protected]>' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
}
这是为什么不工作的原因?我想的逻辑是正确的,但我并不完全确定,如果正确。
我希望有人能帮助我。
非常感谢。
什么功能调用这个例程?如果它没有被调用,它会自动执行吗? – ArrowHead