Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

enviar um email com registros de busca do mysql

Try this......
$check=mysql_query("SELECT * FROM tbl_user WHERE uid='$_SESSION[uid]'");
$percent=mysql_fetch_assoc($check);
$email=$percent['email'];
$to = "$email";
$subject = "Subject";
$message = "
<html>
<head>
<title>Request</title>
</head>
<body>
<font size='20px'>Hello </font>
</body>
</html>
";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
// More headers
$headers .= 'From:Your email id' . "\r\n";
mail($to,$subject,$message,$headers);