This topic is locked
[SOLVED]

 Help with attachments in Runner_mail

4/18/2018 3:30:58 PM
PHPRunner General questions
D
Daviant author

Dear, I need your help with the path of runner_mail.

First of all I explain that the application works in the Desktop environment (Desktop App) within a LAN.
In the Product list page I have linked Invoice data with its corresponding PDF and XML file. Clicking on these links opens the corresponding file that is stored on a network disk (My cloud).
I have added a button that sends me an email or several according to the check box with the function Runner mail.
The emails are sent correctly.
The problem is when I want to add PDFs and XML as attachments.



// Attachments

$pdffile = 'ftp://192.168.0.106/Appweb/pdf/'.$data["RPDF"];

$xmlfile = 'ftp://192.168.0.106/Appweb/xml/'.$data["RXML"];

$attachments = array();

$attachments = array(

array('path' => getabspath($pdffile)),

array('path' => getabspath($xmlfile))

);

// end


I have problems with the path of the file that does not locate it ....
Thank you very much for your help
(Google translator)

D
Daviant author 5/12/2018

In this case you do not have to access the files via FTP, but as a Windows network drive.
Also, as it accessed a specific location, the "getabspath" function does not work in this case.
Once the Network unit is added, it must be accessed in the following way (simplified code):



// Attachments

$attachments = array();

$attachments = array(

array('path' => '//WDMYCLOUD/Appweb'.'/pdf/'.$data['RPDF']),

array('path' => '//WDMYCLOUD/Appweb'.'/xml/'.$data['RXML'])

);

// end attachments


Thank you

(Google translator)