Forums

Cannot attach more than one PDF to email.

Abel 20 Jul, 2015
Hi,
I made a form to make a subscription for a model-flying weekend event.
I tried to attach A PDF file containing dynamic data filled out on the form, AND a separate PDF file containing some extra rules for this weekend.
The attachement with the dynamic data is no problem; that will attach, but the second one: no way...
I searched this forum, and I found, to separate with a comma, without a space.
i also found that I have to use a absolute path.

So; In the E-mail action i filled out in the attachment field the variable "inschrijving" (without the ") (contains the dynamic data, made by the action TCPDF), and the name of the 2th PDF like this:
" inschrijving,http://www.modelvliegclub-emcr.nl/documenten/regels.pdf " (of course even here without the ")
If i do so, nothing will attached;
if i use a space after the comma, like this: " inschrijving, http://www.modelvliegclub-emcr.nl/documenten/regels.pdf " only the file respondenting the variable "inschrijving" will attached......
I tried several things: http://www...... , or only: /documenten/...... or: ../documenten/.....
no matter how i tried, i cannot attach the second PDF...
Any idea?
Abel 20 Jul, 2015
I forgot: I even tried to place the 2th attachment in the same folder as the dynamic data-pdf, and tried to attach with or without the path. Even that will not help...
Abel 21 Jul, 2015
Ok. Bob: ... it looks simple, but it does'n work.
I am not very familiair with PHP (i am 65) but i changed out your example to this:

<?php
$form->files["Piloteninfo"]["path"]="http://www.modelvliegclub-emcr.nl/documenten/piloteninfo.pdf";
// i called this file regels.pdf, but this is the real name
?>
After that i filled out in the form the variable Piloteninfo (I know: it's case sensitive)
I still receive the dynamic PDF, and that's it.
i tried to remove the ["path"] part but it does'nt work... I even tried (in "path")to fill out the complete path with and without the filename, but whatever i do...........
GreyHead 21 Jul, 2015
Hi Abel,

You've put the URL in there it needs to be the folder path instead.

Bob
Abel 21 Jul, 2015
ok i tried this:
<?php
$form->files["Piloteninfo"]["http://www.modelvliegclub-emcr.nl/documenten"]=http://www.modelvliegclub-emcr.nl/documenten/piloteninfo.pdf;
?>
i tried even:

<?php
$form->files["Piloteninfo"]["http://www.modelvliegclub-emcr.nl/documenten"]="http://www.modelvliegclub-emcr.nl/documenten/piloteninfo.pdf";
?>

still: whatever i do: the bird does'nt fly...😟(

i must say: for a non php-familiair your explanation in your faq is NOT clear what really to do :-((
sri: that's not bad to say but i hope you can do something about.
GreyHead 22 Jul, 2015
Hi Abel,

If it starts with http:// . . . then is is a URL; what you need here is a folder path - that looks something like this:
/home/some_account/public_html/documenten/

Bob
This topic is locked and no more replies can be posted.