1- class.phpmailer.php
2- class.smtp.php
Download these both files from
http://sourceforge.net/project/showfiles.php?group_id=26031
or from here
http://phpmailer.codeworxtech.com/
include these both file in your index page
and use this code in index file
$mail = new phpmailer();
$mail->From = $FromName;
$mail->FromName = "";
$mail->Subject = "";
$mail->Body = $strMessage;
$mail->AddAddress($row["fld_email"], "");
$mail->AddAttachment($path, $file_url);
if(!$mail->Send())
echo "There has been a mail error";
else echo"Mail have been send ";
//Clear all addresses and attachments for next loop
$mail->ClearAddresses();
$mail->ClearAttachments();
}