Try this instead. There was some internal restructuring in CF7 3.9.
add_action('wpcf7_before_send_mail','send_pdf');
function send_pdf( $cf7 ) {
$id = $cf7->id();
if ($id==741){
$submission = WPCF7_Submission::get_instance();
$submission->add_uploaded_file('pdf', get_template_directory().'/test.pdf');
}
}
This should work.
Related Posts:
- Transferring contact form input to an email account without using an email-proxy
- Contact Form 7 + Configure SMTP: Sender email appearing as my own email [closed]
- How to validate website field in contact form 7?
- Contact form sender email
- Email address used by website but I do not know where
- Receive no any emails from contact from 7 wordpress
- Is it possible to use different from email in contact form 7 with different domain?
- Use [from-email] from the contact form as sender’s email
- Contact Form 7 How to Alter the From email address?
- Contact Form 7 – E-mail message template [closed]
- What is the difference between ports 465 and 587?
- How to set SMTP programmatically
- changing notification emails from WordPress @mydomain.net to something else
- Alert Email when any Post or Page is Changed
- Missing URL in password reset email
- prevent users from changing their email address
- Allow Duplicate Email Address for Different Users
- Include HTML template file in wp_mail
- Email sent from WordPress has HTML tags
- Reset Password – change from name and email address
- Send mail to wordpress admin
- WP Cron emails not working
- Few chars getting replaced with ‘=’ in mail content in wp_mail()
- Locked out of my own blog and password reset not working
- Change Password notification text on mail
- On form submission how to send 2 email to different users
- email wordpress users using BCC
- email sends from [email protected] even though I have it set to something else
- Joining confirmation email
- How to setup SMTP for only one specific wp_mail()
- General Setting Allow Multiple Email Notification
- Email notification after registration in WordPress
- Trigger WordPress Actions from Email?
- WordPress E-mail Config
- WordPress Add New User – Send an Activation Email
- Send email only upon draft
- wordpress do not let user registered with info@ email and other reserved emails to get registered by users
- Limit number of emails per second
- Throttling email frequency
- WordPress unable to send mail
- Correctly configure SPF/DMARC record to work with WordPress [closed]
- Not able to send links in email after setting header
- 2 Email addresses for each user
- Emailing passwords: Setup installed on home server using XAMPP
- wp_mail_from is ignored
- How to set up a simple email subscription?
- PAGE Specific Email Notifications
- How to send post notification when a Author and Contributor post?
- How to edit the WordPress e-mail that gives the user their password? [duplicate]
- Do action for only switch status for publish_post
- Change the Sender(not From) on wp_mail() function [closed]
- Is Postfix required for WordPress contact forms in general?
- Mailing list sign up form without plugin
- Adding “reply-to” in the email [closed]
- WordPress Won’t Send Email When a User Register
- Programming WordPress to Send an Email on Registration Form Submit?
- How do I troubleshoot registration/password email errors?
- Confirmation required on users email change
- Does WordPress require port 25 for email?
- Is there a plugin that will let you do actions by mail? [closed]
- Getting image in mail
- Send email daily using `wp_mail`
- How to send confirmation email after payment made via paypal?
- How to change the format of the subcriber email
- Changing email “From” address
- wp_mail() won’t send mail when it’s a variable, only when hard coded
- WordPress and IPN problem
- Send email for confirmation during user registration
- Add “Email Image” button with Hyperlink for individual images [closed]
- Mail through Cron Execution does not work!
- About Custom Email Template Design Responsive
- Need to suspend RSS feed while repairing missing old post
- How to recover one of WP email addresses?
- Send email using wordpress plugin on behalf of someone with their permission
- Activation email to change admin address not being sent to Gsuite email account
- Send email with Content-Type text/plain
- forgot password page with expiry link email of 60 minutes
- E-Mail Notification on post edit
- I need to verify emails when users signup
- Why do WordPress emails to multiple recipients include \n in the list
- Where is the account email address located?
- wp_mail() not sending emails with ajax
- SMTP not working for Comments Email Notifications
- wordpress wp mail not changing sender mail
- changing notification emails from WordPress @mydomain.net to something else
- Send Bulk Email without them going to spam
- How can I send an email 24 hours after first email?
- WordPress doesn’t send SMTP email even by phpmailer hook
- Whitelist email sent by WordPress
- Asynchronous emailing
- Send Custom Post Notification to Followers
- Get emails of register user in WordPress
- Duplicate notifications for new user registration
- Create WP account from an external email form submission?
- Display “a generated one [avatar] based on their e-mail address”
- Can wordpress users check GMAIL (G Suite) inbox & send email from their membership account on WordPress? [closed]
- Send email once every 12 months to a particular user [closed]
- Choose from different emails for different purposes
- WordPress wp_mail not working on a few pages
- Admin email value stuck in database?