Support » Fixing WordPress » wp_mail attachment no extension
5 years, 5 months ago
i’m trying to attach a file to a custom contact form, the file get attached, but the extension gets removed. how so? how can i work around?
wp_mail('firstname.lastname@example.org', "contact form", $message, $headers, $attachments);
and i’m getting the #attachments with
$attachments = $_FILES["f_cv"];
so again, the mail gets send, there is an attachment, but it has no extension and also the name of the file gets changed.
my header looks like this
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: ' . $_POST["f_name"] . ' <' . $_POST["f_email"] . '>' . "\r\n";