hi
i want to know how to attach a file along with my email

$headers = "From: xyg@gmail.com";
$to = "xyg@yahoo.com;
$sent = mail($to, $subject, $message, $headers);
}
if($sent)
{ print "Your mail was sent successfully"; }
else
{ print "We encountered an error sending your mail"; }

using the above code i am able to send mails,please tell me how to attach file along with this mail

This might help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.