Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want data submitted through Contact Form 7 to be sent as an attachment as opposed to text / html inside the email body.

Specifically I want this attachment to be in CSV format, which should be relatively straight forward to format based on the contact form 7 fields, but this depends upon whether it is possible to place this text into an attachment.

Is this possible? Thank you.

share|improve this question
add comment

1 Answer 1

Without any coding you can use the Contact Form 7 to Database Extension plugin which has the ability to export the posted data as CSV.

And if you are up for some coding then you can hook the wpcf7_before_send_mail action hook with your own function to create the csv form the $_POST data and sent it.

share|improve this answer
Thank you, I used the wpcf7_before_send_mail action hook, along with the fputcsv php function and it worked nicely :) –  Josh Sep 9 '12 at 13:31
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.