LEARNINGWorking with Attaches
< back forward >
Working with Attaches

Form Processor Pro 4.0 allows you to attach predefined and user-submitted files to e-mail message being sent. Following variables must be set correctly to make this feature work: attachments_path, max_file_size and attachments_ttl.
Please refer to section FPP Description / Basic Configuration File for detailed description of the variables above.

1. Predefined attachments
First, you need to upload attachment to the server folder defined in attachments_path. To attach this file to the email template you need to append to header information such header line:
Attachment: name_of_file

Example (email template, just header lines):
To: email@somehost.com
From: useremail@submitted.com
Subject: Subject you set
Attachment: test.txt


Will attach test.txt file to the email.
User attachments
To enable user-uploaded attaches you need:
  1. your form to be set as multipart-form-data:
    <form enctype="multipart/form-data" ..(other parameters)… >
  2. to include to your form tag of the following kind:
    <input type=file name="field_name">
  3. e-mail template to contain following header:
    Attachment: [field_name_uploaded]
Example:
Form has such tag:
<input type=file name="User-File">

Email template will have such line in headers section:
Attachment: [User-File_uploaded]

Now Form Processor Pro 4.0 will attach user file "User-File" to the email template.
To have more attachments you need to separate them in the email template using comma separation.
Example:
Attachment: [User-File_uploaded], test.txt
< back forward >
 
© 2003 Email-Form.com. All Rights reserved.