Mail Function with Attachments in php<?phpfunction mailWithAttachments($fileName, $filepath, $mailto, $fromMail, $fromName, $replyTo, $subject, $message) { $file = $filepath.$fileName; $file_size = filesize($file); $handle = fopen($file, "r"); $content = fread($handle, $file_size); fclose($handle); $content = chunk_split(base64_encode($content)); $uid = md5(uniqid(time()));//for unique number generate $name = basename($file); $header = "From: ".$from_name." <".$fromMail.">rn"; $header .= "Reply-To: ".$replyTo."rn"; $header .= "MIME-Version: 1.0rn"; $header .= "Content-Type: multipart/mixed; boundary="".$uid.""rnrn";…