Title: Attachment file as variable
Last modified: July 31, 2020

---

# Attachment file as variable

 *  [oxxyfx](https://wordpress.org/support/users/oxxyfx/)
 * (@oxxyfx)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/attachment-file-as-variable/)
 * Hello,
 * I am trying to set up to email membership cards on demand to our members. The
   request form contains a “MAAC: number, email and name field. The membership cards
   are pre-generated and saved under uploads/membershipcard/[maac].pdf
 * If I use the real file name, it will accept the form but is I use it as above
   in the attachment field, it will report an error.
 * Is there any way to make this work with the variable as above?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Mateusz](https://wordpress.org/support/users/enet2020/)
 * (@enet2020)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/attachment-file-as-variable/#post-13205665)
 * Hi,
    I did not understand, Do you want to send the completed membership form 
   in pdf to e-mail?
 * Regards from Poland
    Mateusz
 *  Thread Starter [oxxyfx](https://wordpress.org/support/users/oxxyfx/)
 * (@oxxyfx)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/attachment-file-as-variable/#post-13208045)
 * Hello,
 * I want to send the membership card in attachment. The membership card is located
   at
 * [https://mywebsite.com/wp/wp-content/uploads/participants-database/55769.pdf](https://mywebsite.com/wp/wp-content/uploads/participants-database/55769.pdf)
 * where the 55769 is the [maac] variable. So I would need to make an attachment
   as:
 * uploads/participants-database/[maac].pdf
 * which comes back as an error, because it does not accept the variable in the 
   attachment field.
 * Oxy.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Attachment file as variable’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [oxxyfx](https://wordpress.org/support/users/oxxyfx/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/attachment-file-as-variable/#post-13208045)
 * Status: not resolved