Forums
Forums / Fixing WordPress / wp_mail attachment no extension
(@blackhandr)
14 years, 8 months ago
hi all,
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('[email protected]', "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";
The topic ‘wp_mail attachment no extension’ is closed to new replies.