我有以下代码给自己邮寄一张图片
$img = file_get_contents("http://www.cpc.ncep.noaa.gov/products/predictions/threats/hazards_d3_7_contours.png");
file_put_contents("hazards_d3_7_contours.png",$img);
$message = $img;
$headers = "From: me";
$headers = "Content-type: image/gif";
$subject = '3-7 Weather Hazard Forecast';
$to = 'me@gmail.com';
mail($to, $subject, $message, $headers);
但是我得到的图像被破坏了,为什么?