To => firstname.lastname@example.org',
Subject => 'My File Tester',
Type => 'multipart/mixed');
$msg->attach(Type => 'application/pdf',
Path => '../file.pdf',
Filename => file.pdf',
Disposition => 'attachment');
however, i would like to allow users to upload an attachement so it will not always be a pdf file.
how can i modify the code to allow multiple attachment types (i can get the path and filename from the upload parameter)?
i haven't tried it, but i believe it would work with a dropdown box for the user to select the file type (pdf, doc, xls, gif, jpg, etc.). the value associated with the selection could be passed to the script.
two issues -
1. it seems cheesy to make the user upload the file and tell me what type it is
2. in the case of jpg - if i use type => image/jpg, would it make a difference if the extension is actually jpeg?