This is php code and its working, all the form content successfully send to mail id, but i want to attach PDF file also to email using php this function. But how i can, i don't know.
I would like to add a specified PDF file as a file attachment to the email. How would I do that?
<?php $name = $_REQUEST["name"]; $phone = $_REQUEST["phone"]; $email = $_REQUEST["email"]; $address = $_REQUEST["address"]; $message = $_REQUEST["message"]; date_default_timezone_set("Asia/Calcutta"); $todayis = date("y-m-d H:i:s", time()); $subject = "PVC Order From Website "; $to = "[email protected]"; $msg .= "<table width='600' border='0' align='center' cellpadding='0' ellspacing='0' style='font-family:Arial, Helvetica, sans-serif; font-size:13pt; border:1px solid #0f3f6a;'>"; $msg .= "<tr>"; $msg .= "<td width='16' height='25' bgcolor='#f9cf7b'> </td>"; $msg .= "<td width='96' bgcolor='#f9cf7b'>Name</td>"; $msg .= "<td width='10' height='25' bgcolor='#f9cf7b'><strong>:</strong></td>"; $msg .= "<td height='25' bgcolor='#f9cf7b'>$name</td>"; $msg .= "</tr>"; $msg .= "<tr>"; $msg .= "<td height='25' bgcolor='#f9cf7b'> </td>"; $msg .= "<td height='25' bgcolor='#f9cf7b'>Mobile </td>"; $msg .= "<td height='25' bgcolor='#f9cf7b'><strong>:</strong></td>"; $msg .= "<td height='25' bgcolor='#f9cf7b'>$phone</td>"; $msg .= "</tr>"; $msg .= "<tr>"; $msg .= "<tr>"; $msg .= "<td height='25' bgcolor='#f9cf7b'> </td>"; $msg .= "<td height='25' bgcolor='#f9cf7b'>Email Id </td>"; $msg .= "<td height='25' bgcolor='#f9cf7b'><strong>:</strong></td>"; $msg .= "<td height='25' bgcolor='#f9cf7b'>$email</td>"; $msg .= "</tr>"; $msg .= "<tr>"; $msg .= "<td height='25'> </td>"; $msg .= "<td height='25'>Address</td>"; $msg .= "<td height='25'><strong>:</strong></td>"; $msg .= "<td height='25'>$address</td>"; $msg .= "</tr>"; $msg .= "<tr>"; $msg .= "<td height='25'> </td>"; $msg .= "<td height='25'>Discription</td>"; $msg .= "<td height='25'><strong>:</strong></td>"; $msg .= "<td height='25'>$message</td>"; $msg .= "</tr>"; $msg .= "</table>"; $headers = "From: $c_name < $c_email >."; $headers = "Bcc: admin < $Bcc >."; $headers .= "\r\nContent-Type: text/html; charset=ISO-8859-1\r\n"; mail($to, $subject, $msg, $headers); header("Location:thankyou.html");