Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Senden Sie eine E-Mail mit MySQL-Abrufdatensätzen

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);