Hi guys,
I made an php button to send an email with the attachment of wich the filename is stored in the current record and the attachment is uploaded to _lib/file/doc. My problem is that whatever I try my attachment is not attached tot my email.
This is what I have done :
- In the onload event I save the attachments name into the global variable [attachment].
- In my mail definition I have : $mail_attachment = $this->Ini->path_doc.’/’.[attachment];
- this parmeter is the last parameter in sc_mail_attachment
When I glue this string onto my content everything looks nice /home/<mylinuxuser>/domains/<mydomainname>/private_html/npl3/_lib/file/doc/<myfilename>. Yes that looks the right path from root and the document is there. Check.
The scriptcase documentation and the example look a little bit contraditionary: in the documentation is stated that is the attachment value should contain the absolute path to the document. But in the scriptcase example it is an array. What is it an absolute path or an array containing the absolute path ?
// ****************** SCRIPTCASE EXAMPLE ************************************************** ***********//
$mail_attachments = array( // List of attached files (located on the web server)
‘/path_to_file/attached_file.txt’
);
// ************************************************** ************************************************** ********* //
I also tried this example http://www.scriptcase.net/samples/tutoriais/programming/mcr13.php. No result.
When I try putting in in an array scriptcase raises an exeption “Array to string conversion”. But no error when I put this code
$mail_attachments = $this->Ini->path_doc.’/’.[attachment]; The example given the correct parameters does not work.
My mail is ok but my attachment does not arrive ??? Where do I go wrong?? Suggestions will be very welcome.
Thanks
Roelof