Great! It works! Thankyou so much! I have setup the form so that it sends a confirmation mail with the attachement to the user who filled out the form and one to the admin, so he knows who submitted the form. But both have the attachement in their mail! How/What do I have to change so that only the user gets the attachement, but not the admin (Mailbox of admin would overflow maybe otherwise)?
Cheers!!!
*Miki
Cheers!!!
*Miki
Hi miki,
You'll need to send separate emails to the two of them and empty the attachments array before sending to the admin. You may need to hand-code the second email to do this, you can copy the code that CF uses.
Bob
You'll need to send separate emails to the two of them and empty the attachments array before sending to the admin. You may need to hand-code the second email to do this, you can copy the code that CF uses.
Bob
Hi miki,
show me the code you used to add the attachment to the emails and I will guide you!
Regards
Max
show me the code you used to add the attachment to the emails and I will guide you!
Regards
Max
I made it work. I put this into chronocontact.php:
and this into onSubmit() code:
Was that a good way to solve the problem?
Cheers!
"Miki
if ( $noAttachmentToAdmin != "" && in_array($noAttachmentToAdmin,$recipients) ) {
$attachments = 0;
$mainframe->enqueueMessage('Attachments was not sent to '.$noAttachmentToAdmin.' because value noAttachmentToAdmin was set.');
}
and this into onSubmit() code:
<?php
$attachments['file1'] = "absolute path to attachment";
$noAttachmentToAdmin = "admin@email.com";
?>
Was that a good way to solve the problem?
Cheers!
"Miki
Hi Miki,
hacking the file is not the best way, but you got it working, I think that the code doesn't give enough flexibility anyway to do what you need, I will add this to the todo list!
Regards
Max
hacking the file is not the best way, but you got it working, I think that the code doesn't give enough flexibility anyway to do what you need, I will add this to the todo list!
Regards
Max
I'm trying this modification but when I put the code below, the user don't receive the attachment either.
Any help?
thanks,
Roseline
Any help?
thanks,
Roseline
Hi Roseline,
Please explain what are you trying to do and we may find someway without a hack!
Cheers
Max
Please explain what are you trying to do and we may find someway without a hack!
Cheers
Max
This topic is locked and no more replies can be posted.