WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] form wont submit with attachment once HTML options is checked (3 posts)

  1. Steelcrusher
    Member
    Posted 5 months ago #

    Contact form 7 Version 3.7.

    I have 2 copies of a form, 1 never had HTML option checked the other has.

    The html one wont submit if a file is attach, the other has no trouble. Even is I remove the html option it wont submit.

    if I leave the file uploads empty all is fine.

    the file is uploaded and deleted. (i can see it with filezilla)

    i tried switching back to 2014 default theme. nothing change.

    i get the "Failed to send your message. Please try later or contact the administrator by another method." (not the spam one, i changed to text to make shure)

    Any ideas?

    https://wordpress.org/plugins/contact-form-7/

  2. Steelcrusher
    Member
    Posted 5 months ago #

    Correction:

    If i remove the html option the form submits, i must have done something wrong before. But still if html is checked i get a error.

    for now they will have a plain text message =P

  3. Steelcrusher
    Member
    Posted 5 months ago #

    Never mind, im prety shure I found the culprit.

    Seems the content-type in the plugin is at fault.

    if I replace
    $headers .= "Content-Type: text/html\r\n";
    with
    $headers .="Content-Type: multipart/mixed; charset=UTF-8"."\n";
    in wp-content/plugins/contact-form-7/includes/classes.php line 670

    I can now use the html and send a attachment.

    Guess i needed that walk after all =P

    for me its resolve until next update.

    hope it helps someone else.

Reply

You must log in to post.

About this Plugin

About this Topic