WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_mail attachment no extension (2 posts)

  1. blackhandr
    Member
    Posted 2 years 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('name@domain.com', "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.

  2. blackhandr
    Member
    Posted 2 years ago #

    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";

Topic Closed

This topic has been closed to new replies.

About this Topic