i have used below code
<?php
$file = fopen("contacts.csv","r");
while(! feof($file))
{
$age=fgetcsv($file);
foreach($age as $x_value)
{
$to = $x_value;
$subject = "HTML email";
$message = "<html><head><title>HTML email</title></head><body>here ismessage</body></html>";
$headers = "MIME-Version: 1.0" . "
";
$headers .= "Content-type:text/html;charset=UTF-8" . "
";
$headers .= 'From: <abc@company.com>' . "
";
mail($to,$subject,$message,$headers);
}
}
fclose($file);
?>
i try this but this will not work because this is not secure so what method i use